<?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 search the daily average of the top 95% of events and the percentage change? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266590#M80140</link>
    <description>&lt;P&gt;Thank you for your input!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2016 19:32:58 GMT</pubDate>
    <dc:creator>test365498</dc:creator>
    <dc:date>2016-07-20T19:32:58Z</dc:date>
    <item>
      <title>How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266581#M80131</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I have two separate searches that I would like to combine into one, someone able to assist, please?&lt;/P&gt;

&lt;P&gt;I am trying to accomplish the following: display the 95% top of events daily avg(duration) as well as the percent change of this average between today and yesterday. &lt;/P&gt;

&lt;P&gt;This is what I have so far:&lt;BR /&gt;
For 95% avg: not sure&lt;BR /&gt;
For %change: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search... | bucket _time span=1d | stats avg(duration) as duration_daily by _time |delta duration_daily as change |eval change_percent=change/(duration_daily-change)*100 |timechart span=1d  first(duration_daily) AS "daily avg", first(change_percent) AS "Change (%)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anyway to combine them since I need to see the %change between the average daily values of the 95% of events?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266581#M80131</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T13:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266582#M80132</link>
      <description>&lt;P&gt;You will need to include a subsearch to accomplish this, but you gotta be careful as the performance takes a hit when doing subsearches. You will pipe the first search into &lt;CODE&gt;| appendcols [search SEARCH2]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Search 1 = &lt;CODE&gt;index=search1 * | top(duration)&lt;/CODE&gt;&lt;BR /&gt;
Search 2 = &lt;CODE&gt;index=search2. | bucket _time span=1d | stats avg(duration) as duration_daily by _time |delta duration_daily as change |eval change_percent=change/(duration_daily-change)*100 |timechart span=1d first(duration_daily) AS "daily avg", first(change_percent) AS "Change (%)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Would look like this&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=search1 * | top(duration) | appendcols [search index=search2. | bucket _time span=1d | stats avg(duration) as duration_daily by _time |delta duration_daily as change |eval change_percent=change/(duration_daily-change)*100 |timechart span=1d first(duration_daily) AS "daily avg", first(change_percent) AS "Change (%)"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266582#M80132</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-07-20T13:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266583#M80133</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search earliest=-1d@d | eval when=if(_time&amp;gt;relative_time(now(), "@d"), "Today", "Yesterday") | eval Time=strftime(relative_time(now(), "@d"), "%m/%d/%Y") | chart  avg(duration) as  duration_daily over Time by when | eval "Change (%)"=round(Yesterday/Today*100, 2) | fields - Today - Yesterday | appendcols [ search base search earliest=@d | eval Time=strftime(relative_time(now(), "@d"), "%m/%d/%Y") | chart perc5(bytes) as 95b over Time]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266583#M80133</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-20T13:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266584#M80134</link>
      <description>&lt;P&gt;Something does not look right on my end. How would the search look like just for the average of events, the top 95?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266584#M80134</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T14:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266585#M80135</link>
      <description>&lt;P&gt;Ok, I see. But issue still remains to filter out the bottom 5% and average only the top 95%.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266585#M80135</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T14:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266586#M80136</link>
      <description>&lt;P&gt;&lt;CODE&gt;| stats perc95(your_field)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266586#M80136</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-07-20T14:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266587#M80137</link>
      <description>&lt;P&gt;perc95(duration) will give all the points in the top 95%, correct? Then how can I take the average of those?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266587#M80137</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T14:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266588#M80138</link>
      <description>&lt;P&gt;This will only show 3 cols Time, "Change (%)" AND 95b (this is the field with 95th Percentile value. To see avg(event), remove the &lt;CODE&gt;fields - Today - Yesterday&lt;/CODE&gt; The last segment should be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;chart perc5(duration) as 95b over Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:22:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266588#M80138</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-20T14:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266589#M80139</link>
      <description>&lt;P&gt;You can take the output of &lt;CODE&gt;| stats perc95(duration)&lt;/CODE&gt; and pipe it into another command to find the average &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| stats perc95(duration) | appendcols [search stats  avg(duration)]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266589#M80139</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-07-20T14:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266590#M80140</link>
      <description>&lt;P&gt;Thank you for your input!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 19:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266590#M80140</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T19:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266591#M80141</link>
      <description>&lt;P&gt;Thank you for your input!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 19:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266591#M80141</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-20T19:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the daily average of the top 95% of events and the percentage change?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266592#M80142</link>
      <description>&lt;P&gt;Please accept the answer and/or upvote if this helped you &lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 19:34:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-daily-average-of-the-top-95-of-events-and-the/m-p/266592#M80142</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-07-20T19:34:07Z</dc:date>
    </item>
  </channel>
</rss>

