<?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 can I limit the results to only users that have more than 3 EventCode=4625? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289057#M162848</link>
    <description>&lt;P&gt;How can I limit the results to only users that have more than 3 EventCode=4625? I am trying to show only users that have more than 3 login failures within 5 minutes&lt;/P&gt;

&lt;P&gt;EventCode=4625  user="*"  | dedup user | timechart count&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2018 16:48:21 GMT</pubDate>
    <dc:creator>AbelCruz</dc:creator>
    <dc:date>2018-02-16T16:48:21Z</dc:date>
    <item>
      <title>How can I limit the results to only users that have more than 3 EventCode=4625?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289057#M162848</link>
      <description>&lt;P&gt;How can I limit the results to only users that have more than 3 EventCode=4625? I am trying to show only users that have more than 3 login failures within 5 minutes&lt;/P&gt;

&lt;P&gt;EventCode=4625  user="*"  | dedup user | timechart count&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 16:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289057#M162848</guid>
      <dc:creator>AbelCruz</dc:creator>
      <dc:date>2018-02-16T16:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I limit the results to only users that have more than 3 EventCode=4625?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289058#M162849</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;EventCode=4625 user="*" | bucket _time span=5m | stats count by user _time | where count&amp;gt;3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Feb 2018 17:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289058#M162849</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-02-16T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I limit the results to only users that have more than 3 EventCode=4625?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289059#M162850</link>
      <description>&lt;P&gt;hello there, &lt;/P&gt;

&lt;P&gt;looking at those windows events, consider filtering out accounts that ends with "$" &lt;BR /&gt;
also, the stats command in bucket will work great if the 3 events falls exactly in the 5 minutes bucket. however if for example i have 2 failed logins on 14:44:57 and 14:44:58 and then another 2 failed logins on 14:45:02 and 14:45:04 the &lt;CODE&gt;| where&lt;/CODE&gt; clause will not apply.&lt;BR /&gt;
i think &lt;CODE&gt;| streamstats time_window=5m&lt;/CODE&gt; is a better option.&lt;BR /&gt;
try the following search, and add your &lt;CODE&gt;| where count&amp;gt;3&lt;/CODE&gt; clause after you see some results to test (you can add &lt;CODE&gt;| timechart max(count)&lt;/CODE&gt;  with the right span, at the end if you would like to visualize the data.&lt;BR /&gt;
examples for search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog source="WinEventLog:Security" EventCode=4625 Account_Name=* action=failure
| eval User=if(mvcount(Account_Name)&amp;gt;1, mvindex(Account_Name,1), mvindex(Account_Name, 0)) 
| eval User=lower(User) 
| search NOT User=*$ 
| bucket _time span=5m 
| streamstats time_window=5m count by user _time 
| timechart span=5m max(count) as failed_login by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog source="WinEventLog:Security" EventCode=4624 OR EventCode=4634 Account_Name=* action=success 
| eval User=if(mvcount(Account_Name)&amp;gt;1, mvindex(Account_Name,1), mvindex(Account_Name, 0)) 
| eval User=lower(User) 
| search NOT User=*$ 
| bucket _time span=5m 
| streamstats time_window=5m count by user _time 
| table _time user count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 20:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289059#M162850</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-02-16T20:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I limit the results to only users that have more than 3 EventCode=4625?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289060#M162851</link>
      <description>&lt;P&gt;Hey I think you are missing out &lt;CODE&gt;where&lt;/CODE&gt; function of &lt;CODE&gt;timechart&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;You can try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EventCode=4625 user="*" 
| timechart span=5m count by user WHERE count &amp;gt; 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for more info refer this link:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Timechart#Where_clause_Examples"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Timechart#Where_clause_Examples&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2018 04:38:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-limit-the-results-to-only-users-that-have-more-than-3/m-p/289060#M162851</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-17T04:38:03Z</dc:date>
    </item>
  </channel>
</rss>

