<?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: timechart an average count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45346#M10745</link>
    <description>&lt;P&gt;Thank you for your help!&lt;BR /&gt;
But I think Summary indexing is batter at real-time data, not old data. And my data was crossing 6 months. Even I setup running a query once a day with Summary. I will have to spend 6 months to get the whole results...&lt;BR /&gt;
Is there a simple search, or maybe several of them step by step, to get the results at once?&lt;/P&gt;</description>
    <pubDate>Sat, 24 Aug 2013 07:46:16 GMT</pubDate>
    <dc:creator>crazyeva</dc:creator>
    <dc:date>2013-08-24T07:46:16Z</dc:date>
    <item>
      <title>timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45343#M10742</link>
      <description>&lt;P&gt;Hi, I want to get a chart as 'timechart avgcount span=1d' or 'stats avgcount by _time, span=1d'&lt;BR /&gt;
in which, avgcount means average of last 5 days.&lt;BR /&gt;
That means each point or bar in this chart, is the average count of last 5 days,(count_of_5d/5).instad of total of 1 day.&lt;BR /&gt;
And I want to apply this search to same historical data. so i can not use Summary search for fresh incomeing data.&lt;BR /&gt;
I have some ideas like:&lt;BR /&gt;
events|append [events|eval _time=_time+1day]|append [events|eval _time=_time+2day]|append ......&lt;BR /&gt;
|timechart count/5 span=1d&lt;BR /&gt;
But this is too thick a search for my 1.6 billion events&lt;BR /&gt;
Is there any better ways? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45343#M10742</guid>
      <dc:creator>crazyeva</dc:creator>
      <dc:date>2020-09-28T14:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45344#M10743</link>
      <description>&lt;P&gt;So to clarify, for any given day, you want the chart to reflect what the 5 day average is on that day?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2013 01:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45344#M10743</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-08-24T01:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45345#M10744</link>
      <description>&lt;P&gt;You should setup summary indexing. Run a query once a day that gathers the count for that day and puts the results in a summary index. Then, query the summary index. Quick and easy.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2013 06:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45345#M10744</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-24T06:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45346#M10745</link>
      <description>&lt;P&gt;Thank you for your help!&lt;BR /&gt;
But I think Summary indexing is batter at real-time data, not old data. And my data was crossing 6 months. Even I setup running a query once a day with Summary. I will have to spend 6 months to get the whole results...&lt;BR /&gt;
Is there a simple search, or maybe several of them step by step, to get the results at once?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2013 07:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45346#M10745</guid>
      <dc:creator>crazyeva</dc:creator>
      <dc:date>2013-08-24T07:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45347#M10746</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Knowledge/Managesummaryindexgapsandoverlaps"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Knowledge/Managesummaryindexgapsandoverlaps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2013 09:01:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45347#M10746</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-24T09:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45348#M10747</link>
      <description>&lt;P&gt;Ayn is right. Use a summary index.&lt;/P&gt;

&lt;P&gt;Do something like this:&lt;/P&gt;

&lt;P&gt;Every day just after midnight run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1d@d latest=-0d@d your search | timechart span=1d count as dailycount | collect index=yoursummaryindex marker="datalabel=onedaycount"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then run this a bit later after that count is done:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-5d@d latest=-0d@d index=yoursummaryindex datalabel=onedaycount | stats avg(dailycount) | collect index=yoursummaryindex marker="datalabel=fivedayavg"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then your search can be something like this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yoursummaryindex datalabel=fivedayavg | timechart span=1d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... to make your chart.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 13:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45348#M10747</guid>
      <dc:creator>jtrucks</dc:creator>
      <dc:date>2013-08-27T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45349#M10748</link>
      <description>&lt;P&gt;Thank you very much!&lt;BR /&gt;
I think what exactly i am looking for is in the document which Ayn recommended, "backfill script"&lt;BR /&gt;
But I am not familiar with python. so it will take me a while to understand.&lt;BR /&gt;
I have a temporary solution:&lt;BR /&gt;
overlying events COUNT of day,5 times.each time:_time+86400:&lt;BR /&gt;
1 2 3 4 5 6 7 8 9&lt;BR /&gt;
  1 2 3 4 5 6 7 8&lt;BR /&gt;
    1 2 3 4 5 6 7&lt;BR /&gt;
      1 2 3 4 5 6&lt;BR /&gt;
        1 2 3 4 5&lt;BR /&gt;
although not professional, but it works.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 03:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45349#M10748</guid>
      <dc:creator>crazyeva</dc:creator>
      <dc:date>2013-08-28T03:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: timechart an average count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45350#M10749</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 03:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-an-average-count/m-p/45350#M10749</guid>
      <dc:creator>crazyeva</dc:creator>
      <dc:date>2013-08-28T03:03:41Z</dc:date>
    </item>
  </channel>
</rss>

