<?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 to trigger an alert when a metric is wrong on 3 consecutive spans? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604072#M210136</link>
    <description>&lt;LI-CODE lang="markup"&gt;| timechart span=15m count as TOTAL count(eval(criteria)) as APPROVED
| eval APPROVEDPERCENT=if(TOTAL&amp;gt;0,round((APPROVED*100)/TOTAL,2),100)
| where APPROVEDPERCENT &amp;lt; 50
| stats count as NumberNOK&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 01 Jul 2022 06:35:23 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-07-01T06:35:23Z</dc:date>
    <item>
      <title>How to trigger an alert when a metric is wrong on 3 consecutive spans?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604058#M210132</link>
      <description>&lt;P&gt;Hi everyone, I have a search on approval success rates :&lt;/P&gt;
&lt;P&gt;stats count as TOTAL,count(eval(criteria)) as APPROVED | eval APPROVEDPERCENT=if(TOTAL&amp;gt;0,round((APPROVED*100)/TOTAL,2),100)&lt;/P&gt;
&lt;P&gt;I would then get the percentage of approved transactions on the time range.&lt;/P&gt;
&lt;P&gt;I would like to raise an alert when this approvedpercent is less than 50 in 3 consecutive span of 15min.&lt;/P&gt;
&lt;P&gt;I have tried the following based on another post:&lt;BR /&gt;| timechart span=15min max(APPROVEDPERCENT) as APPPERCENT | where APPPERCENT&amp;lt;50 | stats count as NumberNOK&lt;/P&gt;
&lt;P&gt;(that I could run with the alert trigger condition as NumberNOK&amp;gt;=3 on last 45min)&lt;/P&gt;
&lt;P&gt;But I ran this search on a time range where approval is 100% and NumberNOK is null . Anyone can help on this search?&lt;/P&gt;
&lt;P&gt;thank you in advance&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 03:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604058#M210132</guid>
      <dc:creator>FBachelin</dc:creator>
      <dc:date>2022-07-01T03:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to trigger an alert when a metric is wrong on 3 consecutive spans?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604072#M210136</link>
      <description>&lt;LI-CODE lang="markup"&gt;| timechart span=15m count as TOTAL count(eval(criteria)) as APPROVED
| eval APPROVEDPERCENT=if(TOTAL&amp;gt;0,round((APPROVED*100)/TOTAL,2),100)
| where APPROVEDPERCENT &amp;lt; 50
| stats count as NumberNOK&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Jul 2022 06:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604072#M210136</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-01T06:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to trigger an alert when a metric is wrong on 3 consecutive spans?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604143#M210153</link>
      <description>&lt;P&gt;Thank you so much, it is working . I just have now to trigger the alert if NumberNOK&amp;gt;=3. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 16:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604143#M210153</guid>
      <dc:creator>FBachelin</dc:creator>
      <dc:date>2022-07-01T16:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to trigger an alert when a metric is wrong on 3 consecutive spans?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604147#M210154</link>
      <description>&lt;P&gt;You could add a where command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NumberNOK &amp;gt;= 3&lt;/LI-CODE&gt;&lt;P&gt;Then trigger the alert if there are any rows&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 16:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trigger-an-alert-when-a-metric-is-wrong-on-3-consecutive/m-p/604147#M210154</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-01T16:36:20Z</dc:date>
    </item>
  </channel>
</rss>

