<?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 Why is my search for missing events returning results from clients that actually do have events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267192#M176080</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;SourceName="EBS Check" OR SourceName="EBS Snapshot" | eval hasEBSCheck=1 | append [| metadata type="hosts" | eval hasEBSCheck=0] | stats max(hasEBSCheck) as hasEBSCheck by host | search hasEBSCheck=0 | search host=*-SLX NOT host=*-STG NOT host=*-SANDBOX NOT host=demo-slx 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search is returning 3 clients as having 0 events in the past day from those SourceNames, but they do in fact have the events.  Only 3 of 250+ are coming back incorrectly.  What could be reasons that these 3 are incorrectly calculated?  Clicking on "Events" shows that in fact they have them and the count should not be "0".  &lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2016 13:43:10 GMT</pubDate>
    <dc:creator>colbymahan</dc:creator>
    <dc:date>2016-12-07T13:43:10Z</dc:date>
    <item>
      <title>Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267192#M176080</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;SourceName="EBS Check" OR SourceName="EBS Snapshot" | eval hasEBSCheck=1 | append [| metadata type="hosts" | eval hasEBSCheck=0] | stats max(hasEBSCheck) as hasEBSCheck by host | search hasEBSCheck=0 | search host=*-SLX NOT host=*-STG NOT host=*-SANDBOX NOT host=demo-slx 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search is returning 3 clients as having 0 events in the past day from those SourceNames, but they do in fact have the events.  Only 3 of 250+ are coming back incorrectly.  What could be reasons that these 3 are incorrectly calculated?  Clicking on "Events" shows that in fact they have them and the count should not be "0".  &lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 13:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267192#M176080</guid>
      <dc:creator>colbymahan</dc:creator>
      <dc:date>2016-12-07T13:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267193#M176081</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SourceName="EBS Check" OR SourceName="EBS Snapshot" | stats count as hasEBSCheck by host | append [| metadata type="hosts" | table host | eval hasEBSCheck=0] | stats max(hasEBSCheck) as hasEBSCheck by host | search hasEBSCheck=0 | search host=*-SLX NOT host=*-STG NOT host=*-SANDBOX NOT host=demo-slx
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Dec 2016 20:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267193#M176081</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-07T20:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267194#M176082</link>
      <description>&lt;P&gt;I rewrote the search slightly; I think this makes it more efficient, but I don't believe that it makes the search more accurate.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SourceName="EBS Check" OR SourceName="EBS Snapshot" host=*-SLX NOT host=demo-slx 
| eval hasEBSCheck=1 
| stats first(hasEBSCheck) as hasEBSCheck by host
| append  [ metadata type="hosts" 
       | search host=*-SLX NOT host=demo-slx 
       | eval hasEBSCheck=0 ] 
| stats max(hasEBSCheck) as hasEBSCheck by host 
| search hasEBSCheck=0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To see if anything is going wrong with a search (either this one or yours), you can take a look at the Search Job Inspector and the search.log. Run the search, and then click the Job&amp;gt; link underneath the search bar to find the Job Inspector to examine how the search executed. The search job inspector also has a link to the search.log at the bottom of the page.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 21:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267194#M176082</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-12-07T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267195#M176083</link>
      <description>&lt;P&gt;I like the "stats count as hasEBSCheck" &lt;BR /&gt;
Very efficient&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 21:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267195#M176083</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-12-07T21:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267196#M176084</link>
      <description>&lt;P&gt;While this "works" like the other search, it still is returning 3 hosts that show 0 in the chart but when you look, the events are there.  So same results...   Thanks for the suggestion though...  &lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 22:03:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267196#M176084</guid>
      <dc:creator>colbymahan</dc:creator>
      <dc:date>2016-12-07T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search for missing events returning results from clients that actually do have events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267197#M176085</link>
      <description>&lt;P&gt;OK I think I know why now, but not how to fix it.   Those hosts have events with differing case on the hostname from previous servers that were upgraded.  It looks like splunk is seeing aic-slx as a different server than AIC-SLX.  Since there are no recent events for the older name, it is returning that as a result.  How can I get the report to see aic-slx and AIC-SLX as the same server?    Adding NOT AIC-SLX causes the host to not bee included at all for both cases since Search is case insensitive.  It seems like the lookup/meta data is the part that is differentiating case to see 2 different servers.  &lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 15:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-for-missing-events-returning-results-from/m-p/267197#M176085</guid>
      <dc:creator>colbymahan</dc:creator>
      <dc:date>2016-12-13T15:32:08Z</dc:date>
    </item>
  </channel>
</rss>

