<?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: Finding zero events gives a result of 1 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270337#M190050</link>
    <description>&lt;P&gt;Thanks for your quick reply. I will try your solution.  Using this search in a dashboard (with trafficlight) is working well.&lt;/P&gt;

&lt;P&gt;Btw the trigger is : &lt;STRONG&gt;If number of events is greater than 0&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;So it is a strange thing dat zero events gives a result of one.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2016 08:01:15 GMT</pubDate>
    <dc:creator>pwesterbeek</dc:creator>
    <dc:date>2016-07-26T08:01:15Z</dc:date>
    <item>
      <title>Finding zero events gives a result of 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270333#M190046</link>
      <description>&lt;P&gt;I have the following search :&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;index=cust_prod sourcetype=cust_export Result="Failure" | stats count as fail&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This search is running daily at 7:00 AM and has to generate an alert when an event for Result=”Failure” is found for the last 24 hours. No event is found and still the alert is fired. &lt;/P&gt;

&lt;P&gt;Search job inspector gives the following message:&lt;BR /&gt;
&lt;EM&gt;“This search has completed and has returned 1 result by scanning 0 events in 0.369seconds.”&lt;/EM&gt;&lt;BR /&gt;
What is going on here? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:18:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270333#M190046</guid>
      <dc:creator>pwesterbeek</dc:creator>
      <dc:date>2020-09-29T10:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Finding zero events gives a result of 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270334#M190047</link>
      <description>&lt;P&gt;It depends how you've set up the trigger for your alert. if you set it up as count&amp;gt;0, then this will always fire because, there will always be one row for count. What you can do is add a &lt;CODE&gt;where&lt;/CODE&gt; to the end, like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cust_prod sourcetype=cust_export Result="Failure" | stats count as fail | where count&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270334#M190047</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-25T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Finding zero events gives a result of 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270335#M190048</link>
      <description>&lt;P&gt;Yes in splunk there 500 ways to screw in a light bulb and if you pick the wrong way or don't check your code correctly, the lightbulb won't work, or it will give you a false reading. I've been using splunk for 1.5 years now and i'm learning more and more, go back, recheck and make your code even NEATER! there's always a few extra things you can do to make your search a little faster or easier for people to read/ understand. &lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 20:18:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270335#M190048</guid>
      <dc:creator>Jarohnimo</dc:creator>
      <dc:date>2016-07-25T20:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Finding zero events gives a result of 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270336#M190049</link>
      <description>&lt;P&gt;OR get rid of stats altogether, just use the base search&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 21:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270336#M190049</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-25T21:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Finding zero events gives a result of 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270337#M190050</link>
      <description>&lt;P&gt;Thanks for your quick reply. I will try your solution.  Using this search in a dashboard (with trafficlight) is working well.&lt;/P&gt;

&lt;P&gt;Btw the trigger is : &lt;STRONG&gt;If number of events is greater than 0&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;So it is a strange thing dat zero events gives a result of one.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 08:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-zero-events-gives-a-result-of-1/m-p/270337#M190050</guid>
      <dc:creator>pwesterbeek</dc:creator>
      <dc:date>2016-07-26T08:01:15Z</dc:date>
    </item>
  </channel>
</rss>

