<?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: avg of number of events by day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49951#M11998</link>
    <description>&lt;P&gt;Perfect! thanks a lot! Really good work!&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2010 19:30:37 GMT</pubDate>
    <dc:creator>pinzer</dc:creator>
    <dc:date>2010-09-15T19:30:37Z</dc:date>
    <item>
      <title>avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49945#M11992</link>
      <description>&lt;P&gt;Hi all, i need to search the average number from the count by day of an event.&lt;/P&gt;

&lt;P&gt;for example if i have 3 5 and 4 events in three different days i need the average that is 4.&lt;/P&gt;

&lt;P&gt;the eventtype is &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;eventtype="searchAccountLocked"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;i need also to use rangemap in my search...to control if the number of events of today is higher than the average. I'm using this search queri that doesn't work &lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;&lt;CODE&gt;eventtype="searchAccountLocked" | stats count as count2 | timechart span=1d count | stats avg(count) |rangemap field=count2 green=1-count2 red=count2-50000 default=gray&lt;/CODE&gt; &lt;BR /&gt;&lt;BR /&gt;please help me! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 22:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49945#M11992</guid>
      <dc:creator>pinzer</dc:creator>
      <dc:date>2010-09-14T22:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49946#M11993</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;eventtype="searchAccountLocked" | timechart span=1d count | stats avg(count)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="searchAccountLocked" | bucket span=1d _time | stats count by _time | stats avg(count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Sep 2010 23:02:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49946#M11993</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-14T23:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49947#M11994</link>
      <description>&lt;P&gt;thanks a lot! Good work!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 15:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49947#M11994</guid>
      <dc:creator>pinzer</dc:creator>
      <dc:date>2010-09-15T15:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49948#M11995</link>
      <description>&lt;P&gt;i need also to use rangemap in my search...to control if the number of events of today is higher than the average. I'm using this search queri that doesn't work&lt;/P&gt;

&lt;P&gt;eventtype="searchAccountLocked" | stats count as count2 | timechart span=1d count | stats avg(count) |rangemap field=count2 green=1-count2 red=count2-50000 default=gray&lt;/P&gt;

&lt;P&gt;please help me! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 15:46:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49948#M11995</guid>
      <dc:creator>pinzer</dc:creator>
      <dc:date>2010-09-15T15:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49949#M11996</link>
      <description>&lt;P&gt;You won't be able to use the rangemap command for this purpose. But you can use the eval command to do so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="searchAccountLocked" | timechart span=1d count | stats last(count) as today_count avg(count) as avg_count | eval range=if(today_count&amp;gt;avg_count, "red", "green")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Documentation on the eval command: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Eval" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 17:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49949#M11996</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-15T17:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49950#M11997</link>
      <description>&lt;P&gt;I've added a separate answer for the solution.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 17:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49950#M11997</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-15T17:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: avg of number of events by day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49951#M11998</link>
      <description>&lt;P&gt;Perfect! thanks a lot! Really good work!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 19:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avg-of-number-of-events-by-day/m-p/49951#M11998</guid>
      <dc:creator>pinzer</dc:creator>
      <dc:date>2010-09-15T19:30:37Z</dc:date>
    </item>
  </channel>
</rss>

