<?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 How to search the average and median of the number of events per second for each unique username? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-average-and-median-of-the-number-of-events-per/m-p/214691#M62953</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I need help with a search.&lt;BR /&gt;
Let's imagine we have Windows logs. These logs contain the field &lt;STRONG&gt;Username&lt;/STRONG&gt;.&lt;BR /&gt;
I want to calculate average and median for number events per second per each unique username. &lt;BR /&gt;
Strategic goal is to form something like a baseline - "average user generates so much events per hour/day/week". And detect anomalies based on this.&lt;/P&gt;

&lt;P&gt;How can I do it?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2016 08:11:45 GMT</pubDate>
    <dc:creator>ibondarets</dc:creator>
    <dc:date>2016-04-26T08:11:45Z</dc:date>
    <item>
      <title>How to search the average and median of the number of events per second for each unique username?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-average-and-median-of-the-number-of-events-per/m-p/214691#M62953</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I need help with a search.&lt;BR /&gt;
Let's imagine we have Windows logs. These logs contain the field &lt;STRONG&gt;Username&lt;/STRONG&gt;.&lt;BR /&gt;
I want to calculate average and median for number events per second per each unique username. &lt;BR /&gt;
Strategic goal is to form something like a baseline - "average user generates so much events per hour/day/week". And detect anomalies based on this.&lt;/P&gt;

&lt;P&gt;How can I do it?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 08:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-average-and-median-of-the-number-of-events-per/m-p/214691#M62953</guid>
      <dc:creator>ibondarets</dc:creator>
      <dc:date>2016-04-26T08:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the average and median of the number of events per second for each unique username?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-average-and-median-of-the-number-of-events-per/m-p/214692#M62954</link>
      <description>&lt;P&gt;Try something like this. Below should give you events per second for each user.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search to get windows logs with field _time and Username | bucket span=1s _time | stats count as eps by _time Username 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now to calculate avg and median eps per hour/day/week, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;above search | bucket span=1h _time | stats avg(eps) as avg_eps median(eps) as median_eps by _time user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Change the span to 1h for hour, 1d for day and 1w for week.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 14:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-average-and-median-of-the-number-of-events-per/m-p/214692#M62954</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-26T14:34:38Z</dc:date>
    </item>
  </channel>
</rss>

