<?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: Alert that triggers based on errors per minute over time in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189716#M3216</link>
    <description>&lt;P&gt;So are you trying to alert when the overall count of errors exceeds 5 for all 3 minutes or do the specific different errormsg values need to factor in?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2015 16:17:43 GMT</pubDate>
    <dc:creator>chanfoli</dc:creator>
    <dc:date>2015-01-22T16:17:43Z</dc:date>
    <item>
      <title>Alert that triggers based on errors per minute over time</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189714#M3214</link>
      <description>&lt;P&gt;I'm looking for a way to make an alert trigger only if a certain amount of events occur within a 3 minute period, per minute.&lt;/P&gt;

&lt;P&gt;Right now:&lt;/P&gt;

&lt;P&gt;index=stuff earliest=-4m@m latest=-1m@m &lt;BR /&gt;
| bucket span=1m _time&lt;BR /&gt;
| stats count by _time errormsg&lt;/P&gt;

&lt;P&gt;Running every 3 minutes, and alert set to trigger if events &amp;gt; 5&lt;/P&gt;

&lt;P&gt;Problem is, if there is a single minute spike of errors that exceeds 5 errors within that 3 minute search period, the alert will trigger. I'm looking for help in having the alert trigger only if each minute during that 3 minute period exceeds 5 errors. &lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 15:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189714#M3214</guid>
      <dc:creator>karlduncans</dc:creator>
      <dc:date>2015-01-22T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Alert that triggers based on errors per minute over time</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189715#M3215</link>
      <description>&lt;P&gt;Does your search always results in 3 rows? If so, you can try something like this&lt;/P&gt;

&lt;PRE&gt;
index=stuff earliest=-4m@m latest=-1m@m 
| bucket span=1m _time
| stats count by _time errormsg | eval flag = if(count &amp;gt;5, 1, 0) | eventstats sum(flag) as total | search total = 3
&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jan 2015 16:15:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189715#M3215</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2015-01-22T16:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Alert that triggers based on errors per minute over time</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189716#M3216</link>
      <description>&lt;P&gt;So are you trying to alert when the overall count of errors exceeds 5 for all 3 minutes or do the specific different errormsg values need to factor in?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 16:17:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189716#M3216</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-22T16:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alert that triggers based on errors per minute over time</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189717#M3217</link>
      <description>&lt;P&gt;If your threshold is total errors per minute based you can do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-4m@m latest=-1m@m
| bucket span=1m _time
| stats count  as TotalErrCount values(errmsg) by _time | where TotalErrCount&amp;gt;5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then alert if you get 3 results. If you are wanting to total each specific message and look for cases where there is a specific errmsg with &amp;gt;5 for all 3 minutes then this should do it if you alert on getting 3 results, it would take some refinement to provide per message counts in the results, the goal here was to give 3 results only if at least one specific errmesg occurred more than 5 times in each minute:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-4m@m latest=-1m@m
| bucket span=1m _time
| stats count  as ErrCount by _time errmesg | where ErrCount&amp;gt;5 | stats values(errmesg) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jan 2015 16:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189717#M3217</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-22T16:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alert that triggers based on errors per minute over time</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189718#M3218</link>
      <description>&lt;P&gt;Your 2nd query is what i was looking for. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 21:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-that-triggers-based-on-errors-per-minute-over-time/m-p/189718#M3218</guid>
      <dc:creator>karlduncans</dc:creator>
      <dc:date>2015-01-22T21:17:34Z</dc:date>
    </item>
  </channel>
</rss>

