<?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: How do you create an alert for when zero events occur continuously over a span of time? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438637#M42798</link>
    <description>&lt;P&gt;Best i can tell you is to create an alert like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | stats count by uri_path | append [ | inputlookup uri_path_lookup.csv | ] | eventstats count as eventcount by uri_path | fillnull count=0| where NOT ( eventcount=2 AND count=0) | where count=0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically you create a lookup which has all the possible uri_path and the above search will show you the uri_path where there was no events for last 20 minutes. Run this Alert search every 20 minutes cron schedule ( */20 * * * *) and look for last 20 minutes data. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 22:25:50 GMT</pubDate>
    <dc:creator>macadminrohit</dc:creator>
    <dc:date>2020-09-29T22:25:50Z</dc:date>
    <item>
      <title>How do you create an alert for when zero events occur continuously over a span of time?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438633#M42794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a search based on the following conditions&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="xxx" sourcetype="xxxxx" uri_path="/xxx/xxx/xxxx" http_method=POST http_referrer="*www.xxxxx.com*"  response_code=201 | timechart count by uri_path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to create an alert when the count is zero for 20 minutes. Essentially, it alerts me that no events have occurred for 20 minutes.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 19:27:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438633#M42794</guid>
      <dc:creator>nathomas</dc:creator>
      <dc:date>2018-12-17T19:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert for when zero events occur continuously over a span of time?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438634#M42795</link>
      <description>&lt;P&gt;Just add the time range and trigger for no results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="xxx" sourcetype="xxxxx" uri_path="/xxx/xxx/xxxx" http_method=POST http_referrer="*www.xxxxx.com*"  response_code=201 earliest=-20m latest=now
| timechart count by uri_path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Trigger alert when: Number of results&lt;BR /&gt;
     Is equal to:   0&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 20:10:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438634#M42795</guid>
      <dc:creator>anthonymelita</dc:creator>
      <dc:date>2018-12-17T20:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert for when zero events occur continuously over a span of time?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438635#M42796</link>
      <description>&lt;P&gt;You will have to define the &lt;CODE&gt;span&lt;/CODE&gt; in timechart for 20 minutes. And also &lt;CODE&gt;fillnull&lt;/CODE&gt; with &lt;CODE&gt;value=0&lt;/CODE&gt; and then do &lt;CODE&gt;where count=0&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 21:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438635#M42796</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-12-17T21:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert for when zero events occur continuously over a span of time?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438636#M42797</link>
      <description>&lt;P&gt;Thank you for the query  suggestions - I have applied them:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timechart span=20min count by uri_path | fillnull value=0 | where count=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you have any suggestion for the Alert setup? The Current setup is:&lt;/P&gt;

&lt;P&gt;Alert Type: Real-time&lt;BR /&gt;
Trigger alert when Number of Results is equal to 0 in 20 minutes trigger once, suppress triggering for 20 minutes.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438636#M42797</guid>
      <dc:creator>nathomas</dc:creator>
      <dc:date>2018-12-18T16:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create an alert for when zero events occur continuously over a span of time?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438637#M42798</link>
      <description>&lt;P&gt;Best i can tell you is to create an alert like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | stats count by uri_path | append [ | inputlookup uri_path_lookup.csv | ] | eventstats count as eventcount by uri_path | fillnull count=0| where NOT ( eventcount=2 AND count=0) | where count=0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically you create a lookup which has all the possible uri_path and the above search will show you the uri_path where there was no events for last 20 minutes. Run this Alert search every 20 minutes cron schedule ( */20 * * * *) and look for last 20 minutes data. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-create-an-alert-for-when-zero-events-occur/m-p/438637#M42798</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2020-09-29T22:25:50Z</dc:date>
    </item>
  </channel>
</rss>

