<?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: Failed Login Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578814#M201722</link>
    <description>&lt;P&gt;I'm still getting fewer result compared to running the first query. Also some of the Account Name are wrong(It's just displaying the Host name).&lt;/P&gt;</description>
    <pubDate>Fri, 17 Dec 2021 22:48:10 GMT</pubDate>
    <dc:creator>Mmilaham</dc:creator>
    <dc:date>2021-12-17T22:48:10Z</dc:date>
    <item>
      <title>Failed Login Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578808#M201717</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to write a query that will display failed logins (Account_Name, Host, Count).&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;STRONG&gt;&lt;U&gt;First Query&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=wineventlog EventCode=4625 | top limit=20 Account_Name host&amp;nbsp; | where count &amp;gt; 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;U&gt;Con&lt;/U&gt;&lt;/P&gt;&lt;P&gt;1. Displays "-" in some of the&amp;nbsp;Account_Name fields&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mmilaham_0-1639775438530.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17294iC0A932D12120B85C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mmilaham_0-1639775438530.png" alt="Mmilaham_0-1639775438530.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;U&gt;Pro&lt;/U&gt;&lt;/P&gt;&lt;P&gt;1. Displays all the count and host fields correctly.&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;STRONG&gt;&lt;U&gt;Second Query&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=wineventlog EventCode=4625&amp;nbsp; | rex "(?ms)Account For Which Logon Failed.+?Account Name:\s+(?&amp;lt;Account_Name&amp;gt;\V+)" |top limit=30 Account_Name host| where count &amp;gt;=9&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;U&gt;Con&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Displays&amp;nbsp;all the Account_Name, count and host fields correctly but displays a lot less results on the table compared to the first query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;U&gt;Pro&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Displays&amp;nbsp;all the Account_Name, count and host fields correctly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;I need a query that will displays&amp;nbsp;all the Account_Name, count and host fields correctly as well as displays the same amount of results in the first query. Any help is appreciated. Thanks in advance.&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 21:24:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578808#M201717</guid>
      <dc:creator>Mmilaham</dc:creator>
      <dc:date>2021-12-17T21:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Login Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578810#M201719</link>
      <description>&lt;P&gt;Once you start filtering out undesired account names the number of results will change.&amp;nbsp; Perhaps this is more like what you're looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=wineventlog EventCode=4625 Account_Name!="-" ```Filter out -```
```Count names```
| stats count by Account_Name host
```Filter out accounts with fewer than 10 failures```
| where count &amp;gt; 9
```Sort in descending order by count and take the top 20 results```
| sort 20 - count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 22:11:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578810#M201719</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-17T22:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Login Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578814#M201722</link>
      <description>&lt;P&gt;I'm still getting fewer result compared to running the first query. Also some of the Account Name are wrong(It's just displaying the Host name).&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 22:48:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578814#M201722</guid>
      <dc:creator>Mmilaham</dc:creator>
      <dc:date>2021-12-17T22:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Login Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578816#M201724</link>
      <description>&lt;P&gt;Like I said, it's not possible to discard some results and still end up with the same number of results.&lt;/P&gt;&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command should not be returning results with just the host name in them.&amp;nbsp; Please share your output (sanitized as necessary).&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 02:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Login-Query/m-p/578816#M201724</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-18T02:47:22Z</dc:date>
    </item>
  </channel>
</rss>

