<?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: Finding all instances of a field greater than the avg of that field during a 15 minute span in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85855#M21919</link>
    <description>&lt;P&gt;Give this a shot: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search here&amp;gt; | eventstats count as globalCount avg(TotalResponse) as globalAvg | where TotalResponse &amp;gt; globalAvg | stats count as greaterThanAverageCount last(globalAvg) as globalAvg last(globalCount) as globalCount | eval percent = 100 * greaterThanAverageCount / globalCount | table globalAvg percent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Eventstats command allows you to do anything you can do in stats,  but paint the aggregate statistical results about the whole set back onto each of the original incoming rows.   Basically whenever you have a problem that feels like you need to make "two passes" through the data, you should look at eventstats, or its streaming cousin, streamstats. &lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2013 20:05:48 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2013-10-07T20:05:48Z</dc:date>
    <item>
      <title>Finding all instances of a field greater than the avg of that field during a 15 minute span</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85854#M21918</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a field "TotalResponse" which is the total response time for a web request. I'm attempting to determine the following:&lt;BR /&gt;
 1. What the average "TotalResponse" is over a 15 minute span&lt;BR /&gt;
 2. Return any result where "TotalResponse" is greater than the average&lt;BR /&gt;
 3. Total % of responses that were greater than the average&lt;/P&gt;

&lt;P&gt;I'm having a bit of a tough time figuring out part 2, hopefully someone can help?&lt;/P&gt;

&lt;P&gt;Cheers&lt;BR /&gt;
K&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:00:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85854#M21918</guid>
      <dc:creator>kultar</dc:creator>
      <dc:date>2013-10-07T20:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Finding all instances of a field greater than the avg of that field during a 15 minute span</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85855#M21919</link>
      <description>&lt;P&gt;Give this a shot: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search here&amp;gt; | eventstats count as globalCount avg(TotalResponse) as globalAvg | where TotalResponse &amp;gt; globalAvg | stats count as greaterThanAverageCount last(globalAvg) as globalAvg last(globalCount) as globalCount | eval percent = 100 * greaterThanAverageCount / globalCount | table globalAvg percent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Eventstats command allows you to do anything you can do in stats,  but paint the aggregate statistical results about the whole set back onto each of the original incoming rows.   Basically whenever you have a problem that feels like you need to make "two passes" through the data, you should look at eventstats, or its streaming cousin, streamstats. &lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85855#M21919</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-10-07T20:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Finding all instances of a field greater than the avg of that field during a 15 minute span</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85856#M21920</link>
      <description>&lt;P&gt;I'm just not quick enough, thanks sideview&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85856#M21920</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-10-07T20:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Finding all instances of a field greater than the avg of that field during a 15 minute span</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85857#M21921</link>
      <description>&lt;P&gt;Nature abhors any search language question left unanswered for more than 5 minutes!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85857#M21921</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-10-07T20:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Finding all instances of a field greater than the avg of that field during a 15 minute span</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85858#M21922</link>
      <description>&lt;P&gt;Thanks very much! That was super helpful! Plus, I learned something new!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-all-instances-of-a-field-greater-than-the-avg-of-that/m-p/85858#M21922</guid>
      <dc:creator>kultar</dc:creator>
      <dc:date>2013-10-07T20:17:12Z</dc:date>
    </item>
  </channel>
</rss>

