<?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: Calculating stdev by individual users in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406908#M117554</link>
    <description>&lt;P&gt;Also, I suppose I'm missing a way for this to determine the average on a daily basis over a long period of time. That's why I was considering streamstats, for time_window=1d.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 18:59:03 GMT</pubDate>
    <dc:creator>danataylor</dc:creator>
    <dc:date>2019-01-16T18:59:03Z</dc:date>
    <item>
      <title>Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406899#M117545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to build the following logic and failing: For each user in my Windows Event Logs, calculate the stdev and boundaries for the distinct count (averaged daily) of servers logged into, &lt;STRONG&gt;for each specific user.&lt;/STRONG&gt; I would then theoretically set an alert to yell when any user reaches above their threshold.&lt;/P&gt;

&lt;P&gt;I have read the "Finding and removing outliers" doc, but that seem to allow creating upper and lower limits &lt;STRONG&gt;for each user, or "by user"&lt;/STRONG&gt;, etc. I've tried to modify that information to fit this model and failed. Maybe I'm not understanding it correctly. My attempts look generally like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats dc(dest_nt_host) as new_dc, avg(new_dc) as new_avg, stdev(new_avg) by user as new_stdev
| eval upper = new_avg+(new_stdev*2)
| eval lower = new_avg-(new_stdev*2)    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any advice or guidance on this problem would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 16:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406899#M117545</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T16:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406900#M117546</link>
      <description>&lt;P&gt;It should be as and then by user&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats dc(dest_nt_host) as new_dc, avg(new_dc) as new_avg, stdev(new_avg)  as new_stdev by user
 | eval upper = new_avg+(new_stdev*2)
 | eval lower = new_avg-(new_stdev*2)   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 17:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406900#M117546</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T17:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406901#M117547</link>
      <description>&lt;P&gt;Thank you! However, this search is still not able to calculate thresholds per specific uesrs.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406901#M117547</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T18:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406902#M117548</link>
      <description>&lt;P&gt;Can you please share some sample event. Also why are you using eventstats, can't it be done by stats?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:21:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406902#M117548</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T18:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406903#M117549</link>
      <description>&lt;P&gt;It's generic Windows Event Logs, where dest_nt_host is a value present in each log. No specific reason for using eventstats over stats. I've seen some examples using streamstats, but that doesn't give me output for upper or lower either.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:47:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406903#M117549</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2020-09-29T22:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406904#M117550</link>
      <description>&lt;P&gt;Did you try using stats? It should give you upper and lower values. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406904#M117550</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T18:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406905#M117551</link>
      <description>&lt;P&gt;I tried and it did not return values for those&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:47:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406905#M117551</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T18:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406906#M117552</link>
      <description>&lt;P&gt;I just realized you are performing stats on the as field (avg(new_dc) defined in same eventstats) which will return blank. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406906#M117552</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T18:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406907#M117553</link>
      <description>&lt;P&gt;How else would you perform recursive stats operations? Separate lines (new stats command) for each step?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406907#M117553</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T18:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406908#M117554</link>
      <description>&lt;P&gt;Also, I suppose I'm missing a way for this to determine the average on a daily basis over a long period of time. That's why I was considering streamstats, for time_window=1d.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406908#M117554</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T18:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406909#M117555</link>
      <description>&lt;P&gt;&lt;IMG src="https://imgur.com/a/cbH5ZVY" alt="here's an example search now" /&gt;: &lt;A href="https://imgur.com/a/cbH5ZVY"&gt;https://imgur.com/a/cbH5ZVY&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 19:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406909#M117555</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-16T19:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406910#M117556</link>
      <description>&lt;P&gt;May be something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| streamstats dc(dest_nt_host) as new_dc by User| eventstats  avg(new_dc) as new_avg by user|eventstats stdev(new_avg)  as new_stdev by user
  | eval upper = new_avg+(new_stdev*2)
  | eval lower = new_avg-(new_stdev*2)   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 19:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406910#M117556</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-16T19:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406911#M117557</link>
      <description>&lt;P&gt;Edited to clarify that I am seeking to get stdev of the distinct count (averaged daily) of servers logged into, by each individual user.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 15:30:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406911#M117557</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-17T15:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406912#M117558</link>
      <description>&lt;P&gt;I should note that I am seeking stdev of &lt;EM&gt;distinct count (averaged daily) of servers logged into&lt;/EM&gt;, by each user. I edited my OP to reflect this&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 15:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406912#M117558</guid>
      <dc:creator>danataylor</dc:creator>
      <dc:date>2019-01-17T15:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating stdev by individual users</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406913#M117559</link>
      <description>&lt;P&gt;I haven't tried the search, but something on below lines should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt;| bin span=1d _time| eventstats dc(dest_nt_host) as distinct_host by _time user|eventstats dc(_time) as count1| eval avg=distinct_host/count1| stats values(avg) as new_avg, stdev(avd) as new_stdev by user|  eval upper = new_avg+(new_stdev*2)
   | eval lower = new_avg-(new_stdev*2)   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 17:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-stdev-by-individual-users/m-p/406913#M117559</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-17T17:06:06Z</dc:date>
    </item>
  </channel>
</rss>

