<?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: Dynamically generate user login failures in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Dynamically-generate-user-login-failures/m-p/525330#M8518</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I think the following query may help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...| bin span=1d _time 
| eventstats count as FailedLoginForThisDay by user,_time 
| eventstats avg(FailedLoginForThisDay) as avg_failed_logins by user
| where avg_failed_logins &amp;lt; FailedLoginForThisDay
| table user, ipaddr, ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;bin span=1d _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would help divide the data into 1 day buckets,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eventstats count as FailedLoginForThisDay by user,_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would calculate the number of failed logins per day and user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eventstats avg(FailedLoginForThisDay) as avg_failed_logins by user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would calculate the average failed logins per user&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 11:05:25 GMT</pubDate>
    <dc:creator>t_shreya</dc:creator>
    <dc:date>2020-10-19T11:05:25Z</dc:date>
    <item>
      <title>Dynamically generate user login failures</title>
      <link>https://community.splunk.com/t5/Reporting/Dynamically-generate-user-login-failures/m-p/525320#M8517</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am trying to compute a user's login failure rate so I can pit that against their daily failure rate to see if they're staying within their expected behavior.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The problem is that a user may not login everyday so something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...  | eval av=(FailedLogin/7)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;won't work if a user does not login everyday.&lt;/P&gt;&lt;P&gt;Is there a way to say&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval _counter="0"
|eval if(FailedLoginForThisDay!="0") counter = counter + 1
|span -1d
|eval avg = (FailedLoginTotal/counter)
|eval if(avg &amp;lt; FailedLoginForThisDay) stats count by user, ipaddr, etc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where I am saying iterate over a set of days and determine if a user had a failed login. If so increment the counter, do it in 1 day buckets (is there a better way?) then finally take my counter, find my true average for failed logins and if they are above their average print out their username, ip, and other stats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 09:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Dynamically-generate-user-login-failures/m-p/525320#M8517</guid>
      <dc:creator>oanyanetu</dc:creator>
      <dc:date>2020-10-19T09:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate user login failures</title>
      <link>https://community.splunk.com/t5/Reporting/Dynamically-generate-user-login-failures/m-p/525330#M8518</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I think the following query may help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...| bin span=1d _time 
| eventstats count as FailedLoginForThisDay by user,_time 
| eventstats avg(FailedLoginForThisDay) as avg_failed_logins by user
| where avg_failed_logins &amp;lt; FailedLoginForThisDay
| table user, ipaddr, ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;bin span=1d _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would help divide the data into 1 day buckets,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eventstats count as FailedLoginForThisDay by user,_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would calculate the number of failed logins per day and user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eventstats avg(FailedLoginForThisDay) as avg_failed_logins by user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;would calculate the average failed logins per user&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 11:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Dynamically-generate-user-login-failures/m-p/525330#M8518</guid>
      <dc:creator>t_shreya</dc:creator>
      <dc:date>2020-10-19T11:05:25Z</dc:date>
    </item>
  </channel>
</rss>

