<?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: How can I index login events to the web gui? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61316#M7103</link>
    <description>&lt;HR /&gt;

&lt;P&gt;UPDATE: &lt;/P&gt;

&lt;P&gt;The audit index already tracks everything you should need: &lt;/P&gt;

&lt;P&gt;index=_audit action="login attempt" | stats count by user info &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;ORIGINAL: &lt;/P&gt;

&lt;P&gt;1- when a user logs in succcessfully, there's an event that happens in SplunkWeb's splunk web_service log,  that can be matched by the search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunk_web_service user=* action="login" status="success"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately though this log declines to log anything at all when a login fails.  Possibly if you change log level to DEBUG it might, but that will make it an extremely chatty log. &lt;/P&gt;

&lt;P&gt;2- All of the POST's to the /login endpoint will show up in SplunkWeb's web_access log:  for instance many events will match this search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype="splunk_web_access" POST "/en-US/account/login" status=200
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately SplunkWeb returns 200 even when login fails (and when it should thus return 401).  &lt;/P&gt;

&lt;P&gt;From what I've seen, and granted I haven't looked into it very long, there's not a good way of differentiating a failed login event from a successful login event.  However there's a bad and messy way that might at least stimulate someone else's thinking on the matter. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal ( sourcetype=splunk_web_service user=* action="login" status="success") OR ( sourcetype="splunk_web_access" POST "/en-US/account/login" status=200 ) | eval loginstatus=if(sourcetype="splunk_web_service",status,loginstatus) | transaction clientip endswith="sourcetype=splunk_web_access"  | fillnull loginstatus value="failed" | fillnull user value="unknown" | stats count by user loginstatus clientip&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2012 19:08:21 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2012-01-31T19:08:21Z</dc:date>
    <item>
      <title>How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61314#M7101</link>
      <description>&lt;P&gt;Hi all, &lt;/P&gt;

&lt;P&gt;I noticed 2 things today: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Doesn't look like my indexers are indexing any login events to the GUI. &lt;/LI&gt;
&lt;LI&gt;When going to $splunk_home/var/log/splunk/web-service* , I only see successful login events being logged and not failed login event. &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I would like to get both successful and failed login events indexed via Splunk so I can create alerts for multiple failed logins. &lt;/P&gt;

&lt;P&gt;Any help you can provide on this would be great. &lt;/P&gt;

&lt;P&gt;Thanks. &lt;/P&gt;

&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 18:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61314#M7101</guid>
      <dc:creator>balbano</dc:creator>
      <dc:date>2012-01-31T18:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61315#M7102</link>
      <description>&lt;P&gt;Those events are logged to the &lt;CODE&gt;_audit&lt;/CODE&gt; index and can be retrieved with the following search :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action="login attempt" info=failed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Jan 2012 18:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61315#M7102</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2012-01-31T18:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61316#M7103</link>
      <description>&lt;HR /&gt;

&lt;P&gt;UPDATE: &lt;/P&gt;

&lt;P&gt;The audit index already tracks everything you should need: &lt;/P&gt;

&lt;P&gt;index=_audit action="login attempt" | stats count by user info &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;ORIGINAL: &lt;/P&gt;

&lt;P&gt;1- when a user logs in succcessfully, there's an event that happens in SplunkWeb's splunk web_service log,  that can be matched by the search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunk_web_service user=* action="login" status="success"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately though this log declines to log anything at all when a login fails.  Possibly if you change log level to DEBUG it might, but that will make it an extremely chatty log. &lt;/P&gt;

&lt;P&gt;2- All of the POST's to the /login endpoint will show up in SplunkWeb's web_access log:  for instance many events will match this search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype="splunk_web_access" POST "/en-US/account/login" status=200
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately SplunkWeb returns 200 even when login fails (and when it should thus return 401).  &lt;/P&gt;

&lt;P&gt;From what I've seen, and granted I haven't looked into it very long, there's not a good way of differentiating a failed login event from a successful login event.  However there's a bad and messy way that might at least stimulate someone else's thinking on the matter. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal ( sourcetype=splunk_web_service user=* action="login" status="success") OR ( sourcetype="splunk_web_access" POST "/en-US/account/login" status=200 ) | eval loginstatus=if(sourcetype="splunk_web_service",status,loginstatus) | transaction clientip endswith="sourcetype=splunk_web_access"  | fillnull loginstatus value="failed" | fillnull user value="unknown" | stats count by user loginstatus clientip&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 19:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61316#M7103</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-01-31T19:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61317#M7104</link>
      <description>&lt;P&gt;Thanks Hex. Do you know what would be the best way to alert for any user who has failed login more than 5 times? The current query kinda just shows everyone but want to alert for any user who fails more than 5 times. Any assistance you can provide in that would be great. &lt;/P&gt;

&lt;P&gt;Thanks. &lt;BR /&gt;
Brian&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 21:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61317#M7104</guid>
      <dc:creator>balbano</dc:creator>
      <dc:date>2012-01-31T21:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61318#M7105</link>
      <description>&lt;P&gt;index=_audit action="login attempt" info=failed | stats count by user | where count&amp;gt;4&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 22:05:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61318#M7105</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-01-31T22:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61319#M7106</link>
      <description>&lt;P&gt;awesome!!! Thanks dude!!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 23:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61319#M7106</guid>
      <dc:creator>balbano</dc:creator>
      <dc:date>2012-01-31T23:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I index login events to the web gui?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61320#M7107</link>
      <description>&lt;P&gt;Good to know!!! Thanks Nick!!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 23:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-can-I-index-login-events-to-the-web-gui/m-p/61320#M7107</guid>
      <dc:creator>balbano</dc:creator>
      <dc:date>2012-01-31T23:37:47Z</dc:date>
    </item>
  </channel>
</rss>

