<?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 on delta based on percentage. in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29772#M276</link>
    <description>&lt;P&gt;Splunk put up a page with all the functions that are available in eval. It is quite helpful: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2011 01:45:31 GMT</pubDate>
    <dc:creator>David</dc:creator>
    <dc:date>2011-01-26T01:45:31Z</dc:date>
    <item>
      <title>Alert on delta based on percentage.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29768#M272</link>
      <description>&lt;P&gt;I'm trying to monitor any sudden drops/increases into my Weblogic queue.  I can get a search easy enough to visualise it - I'm just having a hard time formatting it to something I can alert off of.&lt;/P&gt;

&lt;P&gt;Here's the visual search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="weblogic*" JMS_Destination_Queue="CustomerAccountServiceQueue" JMS_Event="Produced" earliest=-10m | timechart span=10m count | delta count as difference
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I thought maybe adding some eval at the end would work - which it kind of does.  I do get a percentage, I'm just not sure what I can do next.  I'd like the alert to trigger if there is a 50% change (positive/negative).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="weblogic*" JMS_Destination_Queue="CustomerAccountServiceQueue" JMS_Event="Produced" earliest=-10m | timechart span=10m count | delta count as difference | eval percdif=(difference/count)*100 | eval percdif=round(percdif,0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2011 04:21:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29768#M272</guid>
      <dc:creator>nocostk</dc:creator>
      <dc:date>2011-01-21T04:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on delta based on percentage.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29769#M273</link>
      <description>&lt;P&gt;Hmm,I think I have it.  Maybe I could get a spot check?  host="weblogic*" JMS_Destination_Queue="CustomerAccountServiceQueue" JMS_Event="Produced" earliest=-10m | timechart span=10m count | delta count as difference | eval percdif=(difference/count)*100 | eval percdif=round(percdif,0)  | where percdif &amp;lt; -50 OR percdif &amp;gt; 50  ::  Then I schedule a job every 10 minutes?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29769#M273</guid>
      <dc:creator>nocostk</dc:creator>
      <dc:date>2020-09-28T09:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on delta based on percentage.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29770#M274</link>
      <description>&lt;P&gt;I'd simplify your statement a touch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="weblogic*" JMS_Destination_Queue="CustomerAccountServiceQueue" JMS_Event="Produced" earliest=-10m | timechart span=10m count | delta count as difference | eval percdif=round(abs(difference/count)*100,0) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you can then alert on if percdif &amp;gt; 50.&lt;/P&gt;

&lt;P&gt;Without knowing your data, though (and knowing that this may be very obvious to you already), note that the above will alert on any sudden drops / increases into the number of times that message is logged, which will not necessarily equal your queue length. If that full message contains a QueueLength field, or anything like that, you might get more useful information by going for that field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="weblogic*" JMS_Destination_Queue="CustomerAccountServiceQueue" JMS_Event="Produced" earliest=-10m | timechart last(QueueLength) as CurrentQueueLength span=10m | delta CurrentQueueLength as difference | eval percdif=round(abs(difference/CurrentQueueLength)*100,0) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jan 2011 10:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29770#M274</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-01-21T10:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on delta based on percentage.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29771#M275</link>
      <description>&lt;P&gt;Very nice, thanks, David.  I didn't realize the the abs() existed.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2011 23:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29771#M275</guid>
      <dc:creator>nocostk</dc:creator>
      <dc:date>2011-01-21T23:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on delta based on percentage.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29772#M276</link>
      <description>&lt;P&gt;Splunk put up a page with all the functions that are available in eval. It is quite helpful: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 01:45:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-delta-based-on-percentage/m-p/29772#M276</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-01-26T01:45:31Z</dc:date>
    </item>
  </channel>
</rss>

