<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: help to compare a search results with a lookup results in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582703#M102658</link>
    <description>&lt;P&gt;it doesnt works&lt;/P&gt;&lt;P&gt;I have site with "Present" status even if they dont exist in my main search&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 08:45:28 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2022-01-27T08:45:28Z</dc:date>
    <item>
      <title>help to display the difference between a search results and a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582669#M102645</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I use a basic search which returns results by site&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(x) as x, count(y) as y by site&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;In a lookup I have also a site list&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup site.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I would like to display in a table panel the site that exists in the lookup but not in the search&lt;/P&gt;&lt;P&gt;Is it possible to do this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:26:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582669#M102645</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T07:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582671#M102646</link>
      <description>&lt;P&gt;This could work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base search&amp;gt;
| append [| inputlookup site.csv | eval keep=1]
| dedup site
| where keep=1
| table site&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 06:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582671#M102646</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-27T06:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582674#M102648</link>
      <description>&lt;P&gt;no it doesnt works&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582674#M102648</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T07:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582678#M102649</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can filter your results after the stats command or (better) in the main search, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index [ | inputlookup site.csv | fields site ]
| stats count(x) as x count(y) as y by site&lt;/LI-CODE&gt;&lt;P&gt;Put attention that the fiield name is the same in the main search and in the lookup (field name is case sensitive).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582678#M102649</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-27T07:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582684#M102652</link>
      <description>&lt;P&gt;sorry I am not explaining correctly&lt;/P&gt;&lt;P&gt;what I want to display in my table panel it's the site which exists in my lookup and which dont exits in my main search&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582684#M102652</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T07:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582686#M102653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;ok, please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats count(x) as x count(y) as y by site
| append [ | inputlookup site.csv | eval status="Present" | fields site status ]
| stats values(x) AS x values(y) AS y values(Status) AS Status BY site
| eval Status=if(isnull(Status),"Not present",Status)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:26:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582686#M102653</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-27T07:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582689#M102654</link>
      <description>&lt;P class="lia-align-left"&gt;there is something wrong because some site have a "Not present" status even if the exists in the main search&lt;/P&gt;&lt;P class="lia-align-left"&gt;and all the site are in "Present" status...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 08:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582689#M102654</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T08:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582690#M102655</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats count(x) as x count(y) as y count by site
| append [ | inputlookup site.csv | eval count=0 | fields site count ]
| stats values(x) AS x values(y) AS y values(Status) AS Status sum(count) AS total BY site
| eval Status=if(total=0,"Not present","Present")
| table site x y Status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582690#M102655</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-27T07:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582692#M102656</link>
      <description>&lt;P&gt;here is the search I run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=toto ((sourcetype=tutu hang &amp;gt; 0) OR ( sourcetype=titi crash=*unlo*) 
    OR (sourcetype="tete web_as &amp;gt; 7000)) 
| eval sante=if((hang&amp;gt;5) AND (crash&amp;gt;2), "Etat de santé dégradé","Etat de santé acceptable") 
| stats count(hang_process_name) as hang, count(crash_process_name) as crash by site 
| append 
    [| inputlookup site.csv 
    | eval status="Present" 
    | fields site status ] 
| stats values(hang) as hang values(crash) AS crash values(Status) AS Status BY site 
| eval Status=if(isnull(Status),"Not present",Status&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582692#M102656</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T07:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582696#M102657</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try my second hint:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=toto ((sourcetype=tutu hang &amp;gt; 0) OR ( sourcetype=titi crash=*unlo*) 
    OR (sourcetype="tete web_as &amp;gt; 7000)) 
| eval sante=if((hang&amp;gt;5) AND (crash&amp;gt;2), "Etat de santé dégradé","Etat de santé acceptable") 
| stats count(hang_process_name) as hang count(crash_process_name) as crash count by site 
| append 
    [| inputlookup site.csv 
    | eval count=0 
    | fields site count ] 
| stats values(hang) as hang values(crash) AS crash values(Status) AS Status sum(count) AS total BY site 
| eval Status=if(total=0,"Not present","Present")
| table site hang crash Status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 08:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582696#M102657</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-27T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582703#M102658</link>
      <description>&lt;P&gt;it doesnt works&lt;/P&gt;&lt;P&gt;I have site with "Present" status even if they dont exist in my main search&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 08:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582703#M102658</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T08:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: help to display the difference between a search results and a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582732#M102667</link>
      <description>&lt;P&gt;Is anybody can help please?&lt;/P&gt;&lt;P&gt;I tried also with set diff but it doesnt works&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| set diff 
    [| search index=toto ((sourcetype=tutu hang &amp;gt; 0) OR ( sourcetype=titi crash=*unlo*) OR (sourcetype="tete web_as &amp;gt; 7000)) 
| eval sante=if((hang&amp;gt;5) AND (crash&amp;gt;2), "Etat dégradé","Etat acceptable") 
    | stats count(hang_process_name) as hang, count(crash_process_name) as crash by site 
    | table site]
   [ | search inputlookup site.csv
    | table site]&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 11:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582732#M102667</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-01-27T11:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: help to display the difference between a search results and a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582738#M102668</link>
      <description>&lt;P&gt;I think you're overcomplicating things and btw, the problem is somehow weirdly specified.&lt;/P&gt;&lt;P&gt;If you want the results which are not in the search, why would you count the stats?&lt;/P&gt;&lt;P&gt;If you just want the sites which are in the lookup but not in your events, do&lt;/P&gt;&lt;PRE&gt;&amp;lt;your search&amp;gt;&lt;BR /&gt;| stats values(site) as site&lt;BR /&gt;| mvexpand site&lt;BR /&gt;| eval siteid=1&lt;BR /&gt;| append &lt;BR /&gt;  [ | inputlookup site.csv&lt;BR /&gt;    | fields site&lt;BR /&gt;    | eval siteid=2 ]&lt;BR /&gt;| stats sum(siteid) by site&lt;BR /&gt;| where siteid=2&lt;/PRE&gt;&lt;P&gt;This way you only get those sites which are in the lookup (and thus have combined siteid=2) but not those that are only in your index (siteid=1) or are in both of those places (siteid=3).&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 12:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582738#M102668</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-01-27T12:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582750#M102672</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;strange! I used this solution in many similar use cases:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats count(x) as x count(y) as y count by site
| append [ | inputlookup site.csv | eval count=0 | fields site count ]
| stats values(x) AS x values(y) AS y sum(count) AS total BY site
| eval Status=if(total=0,"Not present","Present")
| table site x y Status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 13:20:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582750#M102672</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-27T13:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: help to compare a search results with a lookup results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582760#M102675</link>
      <description>&lt;P&gt;Try these 2. Could be format issues (case, padding, trailing characters) between your lookup site vs your main search. So Iet's try to sanitize and normalize the site field and see if it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(x) as x, count(y) as y by site
| append [| inputlookup site.csv | eval keep=1 | fields site keep]
| eval site=UPPER(TRIM(site))
| dedup site
| where keep=1
| table site&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(x) AS x count(y) AS y BY site
| eval search_data="Y"
| append [| inputlookup site.csv | eval lookup_data="Y" | table site lookup_data]
| eval site=UPPER(TRIM(site))
| stats MAX(x) AS x MAX(y) AS y VALUES(search_data) AS search_data VALUES(lookup_data) AS lookup_data BY site
| fillnull value="-"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 14:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/help-to-display-the-difference-between-a-search-results-and-a/m-p/582760#M102675</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-27T14:12:54Z</dc:date>
    </item>
  </channel>
</rss>

