<?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: Mean for Failed Logons to Windows in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131230#M26980</link>
    <description>&lt;P&gt;Looks like I figured it out on my own.....&lt;/P&gt;

&lt;P&gt;stats mean(count) as Standard_Deveation_Of_Successful_Logons by user&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:13:38 GMT</pubDate>
    <dc:creator>hagjos43</dc:creator>
    <dc:date>2020-09-28T15:13:38Z</dc:date>
    <item>
      <title>Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131226#M26976</link>
      <description>&lt;P&gt;I'm trying to grab the number value of all failed logons on windows logs (eventually will be failed logons per account aka user).&lt;/P&gt;

&lt;P&gt;I'm trying to run the mean on the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz ("EventCode=4625") OR ("EventCode=529" OR "EventCode=530" OR "EventCode=531" OR "EventCode=532" OR "EventCode=533" OR "EventCode=534" OR "EventCode=535" OR "EventCode=536" OR "EventCode=537" OR "EventCode=539") (Logon_Type=*) | stats mean(user)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns no value. If I change it to &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;stats mean(EventCode)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It returns a number that is incorrect. This number corresponds to the mean of the EventCode numbers. Perhaps I simply can't wrap my head around the situation, but any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 19:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131226#M26976</guid>
      <dc:creator>hagjos43</dc:creator>
      <dc:date>2013-11-06T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131227#M26977</link>
      <description>&lt;P&gt;I don't follow completely what you're trying to achieve - grab a count of failed logons? If so, just do &lt;CODE&gt;stats count&lt;/CODE&gt; at the end of the search, instead of &lt;CODE&gt;stats mean(...)&lt;/CODE&gt;. If I misunderstood your intentions, please describe them in more detail.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 19:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131227#M26977</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-11-06T19:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131228#M26978</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz ("EventCode=4625") OR ("EventCode=529" OR "EventCode=530" OR "EventCode=531" OR "EventCode=532" OR "EventCode=533" OR "EventCode=534" OR "EventCode=535" OR "EventCode=536" OR "EventCode=537" OR "EventCode=539") (Logon_Type=*) 
| stats count by user
| stats mean(count) as MeanCountOfUserEvents
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;mean&lt;/CODE&gt; function calculates the average of the field that you name. So &lt;CODE&gt;mean(EventCode)&lt;/CODE&gt; will return the mean of the numeric event codes - and Splunk can't even calculate &lt;CODE&gt;mean(user)&lt;/CODE&gt; because none of the values for &lt;CODE&gt;user&lt;/CODE&gt; are numeric. My example counts the number of events for each user, and then takes the mean of that count.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 19:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131228#M26978</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-11-06T19:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131229#M26979</link>
      <description>&lt;P&gt;Thank you! This is what I wanted. Can you add to this though, if I wanted to count the mean of the number of events and show it for each user how would I add that in this query?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 13:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131229#M26979</guid>
      <dc:creator>hagjos43</dc:creator>
      <dc:date>2013-11-07T13:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131230#M26980</link>
      <description>&lt;P&gt;Looks like I figured it out on my own.....&lt;/P&gt;

&lt;P&gt;stats mean(count) as Standard_Deveation_Of_Successful_Logons by user&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131230#M26980</guid>
      <dc:creator>hagjos43</dc:creator>
      <dc:date>2020-09-28T15:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mean for Failed Logons to Windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131231#M26981</link>
      <description>&lt;P&gt;I don't understand how you are using the term "mean" - in English, the statistic called "mean" is also called "average." The mean is calculated for a series of numbers by first summing the numbers and then dividing the total by the count of the numbers.&lt;/P&gt;

&lt;P&gt;The mean is not a "standard deviation" - for a standard deviation, use the &lt;CODE&gt;stdev&lt;/CODE&gt; function instead.&lt;/P&gt;

&lt;P&gt;Finally, this will work for your count by user&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;yoursearchhere &lt;BR /&gt;
| stats count by user&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;mean&lt;/CODE&gt; doesn't make sense here, as you have only one value per user&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mean-for-Failed-Logons-to-Windows/m-p/131231#M26981</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-11-07T17:40:55Z</dc:date>
    </item>
  </channel>
</rss>

