<?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: Find trigger when http error code increase 5% for 3 consecutive minutes in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491449#M8735</link>
    <description>&lt;P&gt;Greetings @mlui_2,&lt;/P&gt;

&lt;P&gt;Please take a look at these run-anywhere searches. This sounds perfect for the &lt;CODE&gt;transpose&lt;/CODE&gt; (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose&lt;/A&gt;) command. Yours will still use &lt;CODE&gt;count&lt;/CODE&gt; instead of &lt;CODE&gt;sum(count)&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           | makeresults | eval _time=now()-(60*5), status="Error", count=101
| append [ | makeresults | eval _time=now()-(60*4), status="Error", count=102 ]
| append [ | makeresults | eval _time=now()-(60*3), status="Error", count=103 ]
| append [ | makeresults | eval _time=now()-(60*2), status="Error", count=104 ]
| append [ | makeresults | eval _time=now()-(60*1), status="Error", count=105 ]
| append [ | makeresults | eval _time=now()-(60*0), status="Error", count=106 ]
| timechart span=1m sum(count) by status
| convert ctime(_time)
| transpose 0
| eval Percent_Increase_3_Mins = if(column="Error", (100*('row 4' - 'row 1') / 'row 1'),"N/A")
| eval Percent_Increase_5_Mins = if(column="Error", (100*('row 6' - 'row 1') / 'row 1'),"N/A")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And here's what the full alert would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           | makeresults | eval _time=now()-(60*5), status="Error", count=101
| append [ | makeresults | eval _time=now()-(60*4), status="Error", count=105 ]
| append [ | makeresults | eval _time=now()-(60*3), status="Error", count=110 ]
| append [ | makeresults | eval _time=now()-(60*2), status="Error", count=115 ]
| append [ | makeresults | eval _time=now()-(60*1), status="Error", count=120 ]
| append [ | makeresults | eval _time=now()-(60*0), status="Error", count=125 ]
| timechart span=1m sum(count) by status
| convert ctime(_time)
| transpose 0
| eval Percent_Increase_3_Mins = if(column="Error", round((100*('row 4' - 'row 1') / 'row 1'), 2),"N/A")
| eval Percent_Increase_5_Mins = if(column="Error", round((100*('row 6' - 'row 1') / 'row 1'), 2),"N/A")
| eval Alert_Type = case (Percent_Increase_5_Mins&amp;gt;5,"Error",
                          Percent_Increase_3_Mins&amp;gt;5,"Warning")
| where isnotnull(Alert_Type)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Sep 2019 21:01:05 GMT</pubDate>
    <dc:creator>jacobpevans</dc:creator>
    <dc:date>2019-09-30T21:01:05Z</dc:date>
    <item>
      <title>Find trigger when http error code increase 5% for 3 consecutive minutes</title>
      <link>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491446#M8732</link>
      <description>&lt;P&gt;Hi guys&lt;/P&gt;

&lt;P&gt;how do create an alert trigger where the follow criteria &lt;/P&gt;

&lt;P&gt;Error Status code 5% increase for 3 consecutive minutes report as "Warning". 5% increase for 5 consecutive minutes report as "Error"&lt;/P&gt;

&lt;P&gt;base search is something like &lt;/P&gt;

&lt;P&gt;index=apacheaccesslogs | fields status | timechart span=1m count by status&lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:26:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491446#M8732</guid>
      <dc:creator>mlui_2</dc:creator>
      <dc:date>2019-09-30T18:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find trigger when http error code increase 5% for 3 consecutive minutes</title>
      <link>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491447#M8733</link>
      <description>&lt;P&gt;is your 5% increase based on each subsequent minute so it's exponential growth you are alerting on or some other aggregate?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491447#M8733</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-09-30T18:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Find trigger when http error code increase 5% for 3 consecutive minutes</title>
      <link>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491448#M8734</link>
      <description>&lt;P&gt;base on the requirement i got, it is based on each subsequent minute.&lt;/P&gt;

&lt;P&gt;but this could lead to false positive alert. I'm open to suggestion on how should the alert should be.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 19:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491448#M8734</guid>
      <dc:creator>mlui_2</dc:creator>
      <dc:date>2019-09-30T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find trigger when http error code increase 5% for 3 consecutive minutes</title>
      <link>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491449#M8735</link>
      <description>&lt;P&gt;Greetings @mlui_2,&lt;/P&gt;

&lt;P&gt;Please take a look at these run-anywhere searches. This sounds perfect for the &lt;CODE&gt;transpose&lt;/CODE&gt; (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose&lt;/A&gt;) command. Yours will still use &lt;CODE&gt;count&lt;/CODE&gt; instead of &lt;CODE&gt;sum(count)&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           | makeresults | eval _time=now()-(60*5), status="Error", count=101
| append [ | makeresults | eval _time=now()-(60*4), status="Error", count=102 ]
| append [ | makeresults | eval _time=now()-(60*3), status="Error", count=103 ]
| append [ | makeresults | eval _time=now()-(60*2), status="Error", count=104 ]
| append [ | makeresults | eval _time=now()-(60*1), status="Error", count=105 ]
| append [ | makeresults | eval _time=now()-(60*0), status="Error", count=106 ]
| timechart span=1m sum(count) by status
| convert ctime(_time)
| transpose 0
| eval Percent_Increase_3_Mins = if(column="Error", (100*('row 4' - 'row 1') / 'row 1'),"N/A")
| eval Percent_Increase_5_Mins = if(column="Error", (100*('row 6' - 'row 1') / 'row 1'),"N/A")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And here's what the full alert would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           | makeresults | eval _time=now()-(60*5), status="Error", count=101
| append [ | makeresults | eval _time=now()-(60*4), status="Error", count=105 ]
| append [ | makeresults | eval _time=now()-(60*3), status="Error", count=110 ]
| append [ | makeresults | eval _time=now()-(60*2), status="Error", count=115 ]
| append [ | makeresults | eval _time=now()-(60*1), status="Error", count=120 ]
| append [ | makeresults | eval _time=now()-(60*0), status="Error", count=125 ]
| timechart span=1m sum(count) by status
| convert ctime(_time)
| transpose 0
| eval Percent_Increase_3_Mins = if(column="Error", round((100*('row 4' - 'row 1') / 'row 1'), 2),"N/A")
| eval Percent_Increase_5_Mins = if(column="Error", round((100*('row 6' - 'row 1') / 'row 1'), 2),"N/A")
| eval Alert_Type = case (Percent_Increase_5_Mins&amp;gt;5,"Error",
                          Percent_Increase_3_Mins&amp;gt;5,"Warning")
| where isnotnull(Alert_Type)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 21:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Find-trigger-when-http-error-code-increase-5-for-3-consecutive/m-p/491449#M8735</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-30T21:01:05Z</dc:date>
    </item>
  </channel>
</rss>

