<?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 Timechart with events/h and average events per hour in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-events-h-and-average-events-per-hour/m-p/319693#M95565</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to create a timechart that shows the amount of events per hour in the last 24 hours, &lt;BR /&gt;
and a line in it that shows the average events per hour of the last 5 days. So far I'm stuck with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test ACTION=RECEIVE | eval events=1 | timechart span=1h sum(events)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I calculate the average events per hour of the last n-days and add it in that chart? &lt;BR /&gt;
Any help is highly appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2017 10:55:22 GMT</pubDate>
    <dc:creator>ckunath</dc:creator>
    <dc:date>2017-04-12T10:55:22Z</dc:date>
    <item>
      <title>Timechart with events/h and average events per hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-events-h-and-average-events-per-hour/m-p/319693#M95565</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to create a timechart that shows the amount of events per hour in the last 24 hours, &lt;BR /&gt;
and a line in it that shows the average events per hour of the last 5 days. So far I'm stuck with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test ACTION=RECEIVE | eval events=1 | timechart span=1h sum(events)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I calculate the average events per hour of the last n-days and add it in that chart? &lt;BR /&gt;
Any help is highly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 10:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-events-h-and-average-events-per-hour/m-p/319693#M95565</guid>
      <dc:creator>ckunath</dc:creator>
      <dc:date>2017-04-12T10:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with events/h and average events per hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-events-h-and-average-events-per-hour/m-p/319694#M95566</link>
      <description>&lt;P&gt;Hello,  ckunath&lt;/P&gt;

&lt;P&gt;May be it is not optimal query but hope help you solve your task&lt;/P&gt;

&lt;P&gt;index=test ACTION=RECEIVE   earliest=-24h | eval events=1 | timechart span=1h sum(events) as T | eval temp_field="field_for_join" &lt;BR /&gt;
| join temp_field [search index=test ACTION=RECEIVE   earliest=-5d  | eval events=1 | stats count(events) as Count_hour_mday by date_hour date_mday &lt;BR /&gt;
| stats avg( Count_hour_mday) as  avg_events | eval temp_field="field_for_join" ]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-events-h-and-average-events-per-hour/m-p/319694#M95566</guid>
      <dc:creator>andrey2007</dc:creator>
      <dc:date>2020-09-29T13:39:38Z</dc:date>
    </item>
  </channel>
</rss>

