<?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: Compare the NOW-1d count of event with the averageof the last month in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-NOW-1d-count-of-event-with-the-averageof-the-last/m-p/85409#M21810</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype="sophos" pmx_action="keep" fur!="none"
earliest=-30d@d latest=@d | stats count as dailyCount by date_mday | stats avg(dailyCount) as  monthlyAvg |
join [search 
sourcetype="sophos" pmx_action="keep" fur!="none"
earliest=-24h@h latest=@h | stats count as todayCount ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search gives 2 results: monthlyAvg and todayCount&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2012 11:38:54 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-01-26T11:38:54Z</dc:date>
    <item>
      <title>Compare the NOW-1d count of event with the averageof the last month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-NOW-1d-count-of-event-with-the-averageof-the-last/m-p/85408#M21809</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;I've got a problem with a Splunk search.
I'd like to compare the last 24 h number of sent mail with the daily average of the last month.&lt;/P&gt;

&lt;P&gt;The search that I'm using is the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="sophos" pmx_action="keep" fur!="none"| bucket span=24h _time | timechart span=24h count | stats last(count) as today_count avg(count) as avg_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that this search compare the average with the count of the event from 00.00 of the last day to the NOW time.&lt;/P&gt;

&lt;P&gt;My will is to compare the NOW-1d count with the average. Is it possible?
Regards&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2010 17:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-NOW-1d-count-of-event-with-the-averageof-the-last/m-p/85408#M21809</guid>
      <dc:creator>fedevietti</dc:creator>
      <dc:date>2010-11-08T17:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the NOW-1d count of event with the averageof the last month</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-NOW-1d-count-of-event-with-the-averageof-the-last/m-p/85409#M21810</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype="sophos" pmx_action="keep" fur!="none"
earliest=-30d@d latest=@d | stats count as dailyCount by date_mday | stats avg(dailyCount) as  monthlyAvg |
join [search 
sourcetype="sophos" pmx_action="keep" fur!="none"
earliest=-24h@h latest=@h | stats count as todayCount ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search gives 2 results: monthlyAvg and todayCount&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2012 11:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-NOW-1d-count-of-event-with-the-averageof-the-last/m-p/85409#M21810</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-01-26T11:38:54Z</dc:date>
    </item>
  </channel>
</rss>

