<?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: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285025#M86178</link>
    <description>&lt;P&gt;Got it working guys. Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2015 23:18:44 GMT</pubDate>
    <dc:creator>neiowe</dc:creator>
    <dc:date>2015-10-22T23:18:44Z</dc:date>
    <item>
      <title>Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285019#M86172</link>
      <description>&lt;P&gt;I am trying to build a report that shows how long a user was logged on.  To do this, I am trying to match LOGON_IDs for the logon and logoff events.  Here's my search code: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((EventCode=4624) OR (EventCode=4634)) AND (Account_Name="ADnowens") |Transaction Logon_ID startswith=4624 endswith=4634 | eval SessionLength= tostring(round(duration/1000,0), "duration") | search SessionLength!="00:00:00" | table host Account_Name SessionLength _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem I am having is that many of the &lt;STRONG&gt;LOGON_ID&lt;/STRONG&gt;s have 0x0 before the actual LOGON_ID on the 4624 events.  The logoff 4634 doesn't have these so they don't match and the report is not catching them.  Any idea how to exclude the 0x0 in the comparison?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 17:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285019#M86172</guid>
      <dc:creator>neiowe</dc:creator>
      <dc:date>2015-10-20T17:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285020#M86173</link>
      <description>&lt;P&gt;So, you have some Logon_ID's that are like 0x0123456 and others that are 123456?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((EventCode=4624) OR (EventCode=4634)) AND (Account_Name="ADnowens") |
rex mode=sed field=Logon_ID "s/^0x0//" |
Transaction Logon_ID startswith=4624 endswith=4634 | 
eval SessionLength= tostring(round(duration/1000,0), "duration") | 
search SessionLength!="00:00:00" | 
table host Account_Name SessionLength _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See if that helps.  &lt;/P&gt;

&lt;P&gt;My Logon_IDs have "0x" in front of them, not "0x0" so that in my case is &lt;CODE&gt;"s/^0x//"&lt;/CODE&gt; instead of &lt;CODE&gt;"s/^0x0//"&lt;/CODE&gt;.  &lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 02:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285020#M86173</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2015-10-21T02:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285021#M86174</link>
      <description>&lt;P&gt;Actually, this is what it looks like:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/752iDBB7997BE461E29E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;It looks like there are two IDs for the 4624 events.  0x0 and the other one below it.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 13:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285021#M86174</guid>
      <dc:creator>neiowe</dc:creator>
      <dc:date>2015-10-21T13:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285022#M86175</link>
      <description>&lt;P&gt;Hi neiowe&lt;/P&gt;

&lt;P&gt;If you're trying to remove 0x0 rich7177's answer should work. &lt;BR /&gt;
| rex mode=sed field=Logon_ID "s/^0x0//"&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 13:52:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285022#M86175</guid>
      <dc:creator>jsven7</dc:creator>
      <dc:date>2015-10-21T13:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285023#M86176</link>
      <description>&lt;P&gt;I get the exact smae results with or without the &lt;STRONG&gt;| rex mode=sed field=Logon_ID "s/^0x0//"&lt;/STRONG&gt; in the search.  The screen shots I posted below shows the Logon_IDs.  It appears there may be a CR between the 0x0 and the Logon_ID for the 4624 events that would match the Logon_ID for the 4634 event.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:39:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285023#M86176</guid>
      <dc:creator>neiowe</dc:creator>
      <dc:date>2020-09-29T07:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285024#M86177</link>
      <description>&lt;P&gt;So it seems my issue now may be with determining the SessionLength.  Rich's solution does seem to remove the 0x0 but my sessionlength is not working correctly. ANy thoughts on what's the best way to determine the time difference between to two events with the same Logon_ID?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 15:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285024#M86177</guid>
      <dc:creator>neiowe</dc:creator>
      <dc:date>2015-10-21T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285025#M86178</link>
      <description>&lt;P&gt;Got it working guys. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 23:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285025#M86178</guid>
      <dc:creator>neiowe</dc:creator>
      <dc:date>2015-10-22T23:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285026#M86179</link>
      <description>&lt;P&gt;Great!  I was about to come in and make some more comments, but found I didn't need to!&lt;/P&gt;

&lt;P&gt;Could you post what you did to solve/resolve it for others to be able to see what the fix was?  Please, accept this answer with additional comment) if it was a really large part of the answer you needed, but feel free if you solved it in a different way entirely to post your OWN answer and mark it as the answer.  That's totally OK as long as it's legit!&lt;/P&gt;

&lt;P&gt;And thanks to helping to make the community better!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 03:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285026#M86179</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2015-10-24T03:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Searching EventCodes for logon and logoff events, LOGON_ID includes 0x0 before actual LOGON_ID. How do I exclude the 0x0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285027#M86180</link>
      <description>&lt;P&gt;| eval logid=mvindex(Logon_ID, 0) - das erste von oben nach unten  gesehen&lt;BR /&gt;
| eval logid=mvindex(Logon_ID, 1) - das zweite&lt;BR /&gt;
| eval logid=mvindex(Logon_ID, 2) - das dritte&lt;BR /&gt;
| eval logid=mvindex(Logon_ID, 3) - das vierte&lt;/P&gt;

&lt;P&gt;mit mvindex legt man fest welches der erkannten Werte genommen werden soll.&lt;BR /&gt;
Wenn ich mich recht entsinne sollte es bei dir &lt;BR /&gt;
| eval logid=mvindex(Logon_ID, 1) sein da die User Logon_ID als zweites kommt.&lt;/P&gt;

&lt;P&gt;Gruß Micki&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-EventCodes-for-logon-and-logoff-events-LOGON-ID/m-p/285027#M86180</guid>
      <dc:creator>vessev</dc:creator>
      <dc:date>2020-09-29T11:51:30Z</dc:date>
    </item>
  </channel>
</rss>

