<?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 alert when one transaction duration more than average duration*10? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103333#M26708</link>
    <description>&lt;P&gt;There are continuous transactions' log into Splunk.&lt;BR /&gt;
Is it possible to let Splunk alert when some transaction's duration is more than 10-times the average duration?&lt;/P&gt;

&lt;P&gt;For example, average duration is A, and if some transaction's duration is over 10A, then Splunk raises an alert.&lt;/P&gt;

&lt;P&gt;I tried "&lt;SOME search=""&gt; | stats avg(duration) as avgdur | eval threshold=avgdur*10 | search duration &amp;gt; threshold" but it doesn't work because events became stats.&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;Any one can give some advice? Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2012 15:07:50 GMT</pubDate>
    <dc:creator>sonicant</dc:creator>
    <dc:date>2012-07-19T15:07:50Z</dc:date>
    <item>
      <title>alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103333#M26708</link>
      <description>&lt;P&gt;There are continuous transactions' log into Splunk.&lt;BR /&gt;
Is it possible to let Splunk alert when some transaction's duration is more than 10-times the average duration?&lt;/P&gt;

&lt;P&gt;For example, average duration is A, and if some transaction's duration is over 10A, then Splunk raises an alert.&lt;/P&gt;

&lt;P&gt;I tried "&lt;SOME search=""&gt; | stats avg(duration) as avgdur | eval threshold=avgdur*10 | search duration &amp;gt; threshold" but it doesn't work because events became stats.&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;Any one can give some advice? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2012 15:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103333#M26708</guid>
      <dc:creator>sonicant</dc:creator>
      <dc:date>2012-07-19T15:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103334#M26709</link>
      <description>&lt;P&gt;stats will transform the event rows themselves.   However &lt;CODE&gt;eventstats&lt;/CODE&gt; will leave the event rows alone, and it will add the stats rows onto every event.   &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;some search=""&amp;gt; | eventstats avg(duration) as avgdur | search duration &amp;gt; avgdur*10&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/eventstats"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/eventstats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;while on the topic you might look at &lt;CODE&gt;streamstats&lt;/CODE&gt; which is similar but where &lt;CODE&gt;eventstats&lt;/CODE&gt; will run statistics over the entire resultset,  &lt;CODE&gt;streamstats&lt;/CODE&gt; will for each row only compute the stats up to that row. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/streamstats"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/streamstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2012 18:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103334#M26709</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-07-19T18:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103335#M26710</link>
      <description>&lt;P&gt;Is there a typo in your answer? Should it really be:&lt;/P&gt;

&lt;P&gt;&lt;SOME search=""&gt; | eventstats avg(duration) as avgdur | search duration &amp;gt; avgdur*10&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;??&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:03:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103335#M26710</guid>
      <dc:creator>richcollier</dc:creator>
      <dc:date>2013-02-27T20:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103336#M26711</link>
      <description>&lt;P&gt;You're absolutely right.  Thanks.  I'll fix the typo in the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103336#M26711</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-27T20:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103337#M26712</link>
      <description>&lt;P&gt;I also couldn't get your example (using eventstats) to work on real data where I knew I had a spike that was about 2.5x larger than the average...&lt;/P&gt;

&lt;P&gt;However, I could get it to work using streamstats:&lt;/P&gt;

&lt;P&gt;&lt;SOME search=""&gt; | streamstats avg(duration) as avgdur | where duration &amp;gt; avgdur*2.5&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;(had to use "where", not "search", by the way)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 22:30:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103337#M26712</guid>
      <dc:creator>richcollier</dc:creator>
      <dc:date>2013-02-27T22:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103338#M26713</link>
      <description>&lt;P&gt;Of course, the real trick here is to be confident that 2.5 (or whatever the number you choose) is the right one. Set it too high and you'll miss potentially interesting spikes. Set it too low and you get bombarded.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 22:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103338#M26713</guid>
      <dc:creator>richcollier</dc:creator>
      <dc:date>2013-02-27T22:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: alert when one transaction duration more than average duration*10?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103339#M26714</link>
      <description>&lt;P&gt;The two searches will behave very differently!   streamstats will only calculate the average from the earliest point in the set up to the current row.  And then each row might end up with a slightly different average.  eventstats on the other hand will compute the average over the entire set, and then paint that single average onto every row.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 22:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/alert-when-one-transaction-duration-more-than-average-duration/m-p/103339#M26714</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-27T22:45:59Z</dc:date>
    </item>
  </channel>
</rss>

