<?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 alert on zero result didn't work as expected in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/alert-on-zero-result-didn-t-work-as-expected/m-p/185778#M3106</link>
    <description>&lt;P&gt;I have this string and give me a correct count number but when I tried set on alert keep sending me false alert. my objective is to get alert when number of result on my case "logged in users" are zero for last 30min.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                    index="mysite" sourcetype="logged in users" | stats count

                  Earliest:-15m
                  Latest:now
                  Cron Expression:*/30 * * * *
                  Trigger if number of results: is less than 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also tried equal to "0" &lt;/P&gt;

&lt;P&gt;but keep getting alert, when I checked the search actually there are 100 results.&lt;/P&gt;

&lt;P&gt;thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jun 2014 17:35:02 GMT</pubDate>
    <dc:creator>raindrop18</dc:creator>
    <dc:date>2014-06-02T17:35:02Z</dc:date>
    <item>
      <title>alert on zero result didn't work as expected</title>
      <link>https://community.splunk.com/t5/Alerting/alert-on-zero-result-didn-t-work-as-expected/m-p/185778#M3106</link>
      <description>&lt;P&gt;I have this string and give me a correct count number but when I tried set on alert keep sending me false alert. my objective is to get alert when number of result on my case "logged in users" are zero for last 30min.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                    index="mysite" sourcetype="logged in users" | stats count

                  Earliest:-15m
                  Latest:now
                  Cron Expression:*/30 * * * *
                  Trigger if number of results: is less than 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also tried equal to "0" &lt;/P&gt;

&lt;P&gt;but keep getting alert, when I checked the search actually there are 100 results.&lt;/P&gt;

&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 17:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alert-on-zero-result-didn-t-work-as-expected/m-p/185778#M3106</guid>
      <dc:creator>raindrop18</dc:creator>
      <dc:date>2014-06-02T17:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: alert on zero result didn't work as expected</title>
      <link>https://community.splunk.com/t5/Alerting/alert-on-zero-result-didn-t-work-as-expected/m-p/185779#M3107</link>
      <description>&lt;P&gt;The query that you're using will always return one row.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index="mysite" sourcetype="logged in users" | stats count

Output:

Count
------
countValue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;countValue=0 if there are no rows in the sourcetype. &lt;BR /&gt;
Just get rid of "|stats" in your alert OR use alert based on count field value.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 17:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alert-on-zero-result-didn-t-work-as-expected/m-p/185779#M3107</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-02T17:40:42Z</dc:date>
    </item>
  </channel>
</rss>

