<?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 alert on a value crossing over a moving average of that value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22008#M3721</link>
    <description>&lt;P&gt;I'm trying to run a similar search looking at decline rates for a payment gateway. I want to look at the current decline rate average trend line and also the running average trendline. &lt;/P&gt;

&lt;P&gt;tried doing something similar but ended up getting Mismatched ']' when I ran my query.&lt;/P&gt;

&lt;P&gt;gateway=firstdata errorType=declined event=transaction Completed earliest=-1h@h latest=@h | bucket _time span=1h | stats count as hourlyCount by _time | appendcols { search searchforerrors earliest=-7d@d latest=-1h@h | bucket _time span=1h | stats count by _time | stats avg(count) as average ] |where hourlyCount &amp;gt; average&lt;/P&gt;

&lt;P&gt;Any idea why? &lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2016 22:11:07 GMT</pubDate>
    <dc:creator>mhamano</dc:creator>
    <dc:date>2016-03-09T22:11:07Z</dc:date>
    <item>
      <title>How to alert on a value crossing over a moving average of that value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22005#M3718</link>
      <description>&lt;P&gt;Is there any way to do this in a single search?  I know it can be done by having one search compute the moving average of the field and then write that to a lookup table.  A subsequent search would then compute the value for the time period and see if it is above the value in the lookup table.&lt;/P&gt;

&lt;P&gt;Is there any way to do it with a single search that doesn't require a lookup table?&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;

&lt;P&gt;Craig&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2012 19:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22005#M3718</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2012-11-02T19:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on a value crossing over a moving average of that value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22006#M3719</link>
      <description>&lt;P&gt;Let me make this more specific, so that i can show an example. Every hour, I want to compare the number of errors from the past hour with the average number of errors for the past week. If the hourly count &amp;gt; the average count, then trigger an alert.&lt;/P&gt;

&lt;P&gt;This search will do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;searchforerrors earliest=-1h@h latest=@h
| bucket _time span=1h
| stats count as hourlyCount by _time
| appendcols { search  searchforerrors earliest=-7d@d latest=-1h@h
      | bucket _time span=1h
      | stats count by _time
      | stats avg(count) as average ]
| where hourlyCount &amp;gt; average
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Schedule this search to run once each hour and to trigger if the number of results is greater than zero.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Nov 2012 07:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22006#M3719</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-03T07:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on a value crossing over a moving average of that value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22007#M3720</link>
      <description>&lt;P&gt;actually &lt;CODE&gt;trendline&lt;/CODE&gt; or the &lt;CODE&gt;streamstats&lt;/CODE&gt; commands will let you do this fairly easily, but really it's hard to say what works for you unless we know how you are averaging your data.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2012 05:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22007#M3720</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-11-05T05:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on a value crossing over a moving average of that value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22008#M3721</link>
      <description>&lt;P&gt;I'm trying to run a similar search looking at decline rates for a payment gateway. I want to look at the current decline rate average trend line and also the running average trendline. &lt;/P&gt;

&lt;P&gt;tried doing something similar but ended up getting Mismatched ']' when I ran my query.&lt;/P&gt;

&lt;P&gt;gateway=firstdata errorType=declined event=transaction Completed earliest=-1h@h latest=@h | bucket _time span=1h | stats count as hourlyCount by _time | appendcols { search searchforerrors earliest=-7d@d latest=-1h@h | bucket _time span=1h | stats count by _time | stats avg(count) as average ] |where hourlyCount &amp;gt; average&lt;/P&gt;

&lt;P&gt;Any idea why? &lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 22:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22008#M3721</guid>
      <dc:creator>mhamano</dc:creator>
      <dc:date>2016-03-09T22:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on a value crossing over a moving average of that value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22009#M3722</link>
      <description>&lt;P&gt;I'm trying to run a similar search looking at decline rates for a payment gateway. I want to look at the current decline rate average trend line and also the running average trendline. &lt;/P&gt;

&lt;P&gt;tried doing something similar but ended up getting Mismatched ']' when I ran my query.&lt;/P&gt;

&lt;P&gt;gateway=firstdata errorType=declined event=transaction Completed earliest=-1h@h latest=@h | bucket _time span=1h | stats count as hourlyCount by _time | appendcols { search searchforerrors earliest=-7d@d latest=-1h@h | bucket _time span=1h | stats count by _time | stats avg(count) as average ] |where hourlyCount &amp;gt; average&lt;/P&gt;

&lt;P&gt;Any idea why? &lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 22:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-a-value-crossing-over-a-moving-average-of-that/m-p/22009#M3722</guid>
      <dc:creator>mhamano</dc:creator>
      <dc:date>2016-03-09T22:11:29Z</dc:date>
    </item>
  </channel>
</rss>

