<?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 MV(filter) with Logon Events Info in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442926#M6364</link>
    <description>&lt;P&gt;I'd like to filter all records with NULL SID.&lt;BR /&gt;
For every valid record returned a NULL SID record is returned as well. When I try to filter with !="NULL SID" it filters both records.&lt;BR /&gt;
I've tried working with MV but not getting anywhere.&lt;/P&gt;

&lt;P&gt;Any suggestions appreciated! Thanks!&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Search:&lt;/STRONG&gt;&lt;BR /&gt;
index="wineventlog" EventCode=4624&lt;BR /&gt;
| stats count as "Number of Logins" by Security_ID Source_Network_Address&lt;BR /&gt;
| rename Security_ID as "Account Name", Source_Network_Address as "Login IP"&lt;BR /&gt;
| table "Account Name" "Login IP" "Number of Logins"&lt;BR /&gt;
| sort "Account Name"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&lt;BR /&gt;
Account Name Login IP Number of Logins&lt;BR /&gt;
XYZ\John.Doe ip address1  1&lt;BR /&gt;
XYZ\Jane.Doe ip address2  1&lt;BR /&gt;
XYZ\Tom.Smith ip address3  1&lt;BR /&gt;
NULL SID ip address1  1&lt;BR /&gt;
NULL SID ip address2  1&lt;BR /&gt;
NULL SID ip address3&amp;gt; 1&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Raw Event Excerpt:&lt;/STRONG&gt;&lt;BR /&gt;
Keywords=Audit Success&lt;BR /&gt;
Message=An account was successfully logged on.&lt;/P&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
Security ID: NULL SID&lt;BR /&gt;
Account Name: -&lt;BR /&gt;
Account Domain: -&lt;BR /&gt;
Logon ID: 0x0&lt;/P&gt;

&lt;P&gt;Logon Type: 3&lt;/P&gt;

&lt;P&gt;Impersonation Level: Impersonation&lt;/P&gt;

&lt;P&gt;New Logon:&lt;BR /&gt;
Security ID: XYZ\John.Doe&lt;BR /&gt;
Account Name: John.Doe&lt;BR /&gt;
Account Domain: XYZ&lt;BR /&gt;
Logon ID: 0x38xxx53F&lt;BR /&gt;
Logon GUID: {4CC2EC1A-F0A1-A0F1-E7AE-XXXXXXXXXXXX}&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:04:08 GMT</pubDate>
    <dc:creator>sbgoldberg13</dc:creator>
    <dc:date>2020-09-29T23:04:08Z</dc:date>
    <item>
      <title>MV(filter) with Logon Events Info</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442926#M6364</link>
      <description>&lt;P&gt;I'd like to filter all records with NULL SID.&lt;BR /&gt;
For every valid record returned a NULL SID record is returned as well. When I try to filter with !="NULL SID" it filters both records.&lt;BR /&gt;
I've tried working with MV but not getting anywhere.&lt;/P&gt;

&lt;P&gt;Any suggestions appreciated! Thanks!&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Search:&lt;/STRONG&gt;&lt;BR /&gt;
index="wineventlog" EventCode=4624&lt;BR /&gt;
| stats count as "Number of Logins" by Security_ID Source_Network_Address&lt;BR /&gt;
| rename Security_ID as "Account Name", Source_Network_Address as "Login IP"&lt;BR /&gt;
| table "Account Name" "Login IP" "Number of Logins"&lt;BR /&gt;
| sort "Account Name"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&lt;BR /&gt;
Account Name Login IP Number of Logins&lt;BR /&gt;
XYZ\John.Doe ip address1  1&lt;BR /&gt;
XYZ\Jane.Doe ip address2  1&lt;BR /&gt;
XYZ\Tom.Smith ip address3  1&lt;BR /&gt;
NULL SID ip address1  1&lt;BR /&gt;
NULL SID ip address2  1&lt;BR /&gt;
NULL SID ip address3&amp;gt; 1&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Raw Event Excerpt:&lt;/STRONG&gt;&lt;BR /&gt;
Keywords=Audit Success&lt;BR /&gt;
Message=An account was successfully logged on.&lt;/P&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
Security ID: NULL SID&lt;BR /&gt;
Account Name: -&lt;BR /&gt;
Account Domain: -&lt;BR /&gt;
Logon ID: 0x0&lt;/P&gt;

&lt;P&gt;Logon Type: 3&lt;/P&gt;

&lt;P&gt;Impersonation Level: Impersonation&lt;/P&gt;

&lt;P&gt;New Logon:&lt;BR /&gt;
Security ID: XYZ\John.Doe&lt;BR /&gt;
Account Name: John.Doe&lt;BR /&gt;
Account Domain: XYZ&lt;BR /&gt;
Logon ID: 0x38xxx53F&lt;BR /&gt;
Logon GUID: {4CC2EC1A-F0A1-A0F1-E7AE-XXXXXXXXXXXX}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442926#M6364</guid>
      <dc:creator>sbgoldberg13</dc:creator>
      <dc:date>2020-09-29T23:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: MV(filter) with Logon Events Info</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442927#M6365</link>
      <description>&lt;P&gt;@sbgoldberg13,&lt;/P&gt;

&lt;P&gt;If you just want the first 3 records from your results , below should work - assuming "NULL SID" is a string and not real &lt;CODE&gt;null()&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="wineventlog" EventCode=4624
| stats count as "Number of Logins" by Security_ID Source_Network_Address
| rename Security_ID as "Account Name", Source_Network_Address as "Login IP"
| table "Account Name" "Login IP" "Number of Logins"
| where "Account Name" != "NULL SID"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the above does not work, please lets know what the expected output. Used below search to test it&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults|eval Account="XYZ\John.Doe,XYZ\Jane.Doe,XYZ\Tom.Smith,NULL SID,NULL SID,NULL SID"|makemv Account delim=","|mvexpand Account
|appendcols [|makeresults|eval Login="ip address1,ip address2,ip address3,ip address1,ip address2,ip address3"|makemv Login delim=","|mvexpand Login]
|appendcols [|makeresults|eval NoOfLogins="1,1,1,1,1,1"|makemv NoOfLogins delim=","|mvexpand NoOfLogins]
|rename COMMENT as "---All above is for dummy data generation---"
|where Account!="NULL SID"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Feb 2019 03:09:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442927#M6365</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-02T03:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: MV(filter) with Logon Events Info</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442928#M6366</link>
      <description>&lt;P&gt;I think that what is happening is that the &lt;CODE&gt;Account&lt;/CODE&gt; field is ending up &lt;CODE&gt;multi-valued&lt;/CODE&gt;.  If so, this will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Account="XYZ\John.Doe,XYZ\Jane.Doe,XYZ\Tom.Smith,NULL SID,NULL SID,NULL SID" 
| makemv Account delim="," 
| mvexpand Account 
| appendcols 
    [| makeresults 
    | eval Login="ip address1,ip address2,ip address3,ip address1,ip address2,ip address3" 
    | makemv Login delim="," 
    | mvexpand Login] 
| appendcols 
    [| makeresults 
    | eval NoOfLogins="1,1,1,1,1,1" 
    | makemv NoOfLogins delim="," 
    | mvexpand NoOfLogins] 
| stats values(Account) AS Account BY Login

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| eval Account=mvfilter(NOT match(Account, "NULL SID"))
| where isnotnull(Account)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Feb 2019 19:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442928#M6366</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-02T19:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: MV(filter) with Logon Events Info</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442929#M6367</link>
      <description>&lt;P&gt;I'll try, but I'm not looking for the first 3.    There's hundreds of records that are duplicated with a NULL SID record.  I want to eliminate all the duplicate records but not all of the records.  Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 12:55:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442929#M6367</guid>
      <dc:creator>sbgoldberg13</dc:creator>
      <dc:date>2019-02-04T12:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: MV(filter) with Logon Events Info</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442930#M6368</link>
      <description>&lt;P&gt;A 4624 can have "NULL SID" for Security ID under "Subject", but have a non-null value for the same Security ID under "New Logon" for the same event.  In such cases, "Account Name"!="NULL SID" will show as records removed for 'stats' command, but the underlying raw data is same.&lt;/P&gt;

&lt;P&gt;index=wineventlog EventCode=4624 Logon_Type=3  "take a particular src_ip here" | your search | addcoltotals | search "Account Name" !="NULL SID"&lt;/P&gt;

&lt;P&gt;you can test the count with addcoltotals to see that the underlying raw event is same&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/MV-filter-with-Logon-Events-Info/m-p/442930#M6368</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2020-09-29T23:08:50Z</dc:date>
    </item>
  </channel>
</rss>

