<?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 get the overall average and average per 5 minutes on a Time Chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-overall-average-and-average-per-5-minutes-on-a/m-p/447471#M126833</link>
    <description>&lt;P&gt;Does this work for you ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=service1 |fields _time,SERVICE_TIME_TAKEN|eventstats avg(SERVICE_TIME_TAKEN) as overall_service_time  | timechart span=5m avg(SERVICE_TIME_TAKEN) as service_time ,first(overall_service_time) as overall_service_time 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Jun 2018 15:01:31 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-06-06T15:01:31Z</dc:date>
    <item>
      <title>How to get the overall average and average per 5 minutes on a Time Chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-overall-average-and-average-per-5-minutes-on-a/m-p/447470#M126832</link>
      <description>&lt;P&gt;I have a timechart which currently outputs the average value for every 5 minutes over a period of time for the field "SERVICE_TIME_TAKEN" using following query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=service1 | timechart span=5m avg(SERVICE_TIME_TAKEN) | fillnull 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to add a second line on this same time chart which shows the overall average value. This would be a single value which draws a straight line on the chart. &lt;/P&gt;

&lt;P&gt;If I make a separate query, I am able to get this single value using following query. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=service1 | chart avg(SERVICE_TIME_TAKEN)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I combine these 2 queries to to show the data on a single time chart? &lt;/P&gt;

&lt;P&gt;Tried the following but it only shows the line with the 5 min average. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=service1 | timechart span=5m avg(SERVICE_TIME_TAKEN) as service_time | eventstats avg(SERVICE_TIME_TAKEN) as overall_service_time  | fillnull 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This image depicts what I am looking for.&lt;BR /&gt;
Orange line is the 5 mins average and blue line is the overall average. &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/251885-chart.png" alt="chart" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-overall-average-and-average-per-5-minutes-on-a/m-p/447470#M126832</guid>
      <dc:creator>angersleek</dc:creator>
      <dc:date>2020-09-29T19:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the overall average and average per 5 minutes on a Time Chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-overall-average-and-average-per-5-minutes-on-a/m-p/447471#M126833</link>
      <description>&lt;P&gt;Does this work for you ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=service1 |fields _time,SERVICE_TIME_TAKEN|eventstats avg(SERVICE_TIME_TAKEN) as overall_service_time  | timechart span=5m avg(SERVICE_TIME_TAKEN) as service_time ,first(overall_service_time) as overall_service_time 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 15:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-overall-average-and-average-per-5-minutes-on-a/m-p/447471#M126833</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-06T15:01:31Z</dc:date>
    </item>
  </channel>
</rss>

