<?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 do i capture login ID as the same field across two differently-formatted logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149088#M41648</link>
    <description>&lt;P&gt;your search | rex  field=_raw  "(?&lt;USER_ID&gt;\w+)\slogged\sin"&lt;/USER_ID&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:19:16 GMT</pubDate>
    <dc:creator>lukejadamec</dc:creator>
    <dc:date>2020-09-28T15:19:16Z</dc:date>
    <item>
      <title>How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149086#M41646</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Looking for ideas on how to attack a problem...&lt;/P&gt;

&lt;P&gt;I have a couple of different systems (servers and vpn's) and I need to show login id's that have been used on both.  I have the login  message for both systems, but the format is different. How do I capture the login id across both feeds, using the same field? &lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;message 1:  User1 logged in...&lt;BR /&gt;
message 2:  mm/dd/yyy system abc - User1 logged in&lt;/P&gt;

&lt;P&gt;I want to run a search to grab the "user" and map it to one field, across both feeds? &lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 02:43:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149086#M41646</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-11-20T02:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149087#M41647</link>
      <description>&lt;P&gt;You can use the rex command if you want to do it in the search bar. If not, you can move the regex to the props.conf and transforms.conf to make it automatic.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your search | rex "(?&amp;lt;user_id&amp;gt;\w+)\slogged\sin"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This regex will work for both cases, assuming that the user id's are [A-Za-Z0-9_]. If other characters can be expected you will have to account for that by changing the \w+ to [\w(your other chars)]+&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 02:50:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149087#M41647</guid>
      <dc:creator>ShaneNewman</dc:creator>
      <dc:date>2013-11-20T02:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149088#M41648</link>
      <description>&lt;P&gt;your search | rex  field=_raw  "(?&lt;USER_ID&gt;\w+)\slogged\sin"&lt;/USER_ID&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:19:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149088#M41648</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2020-09-28T15:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149089#M41649</link>
      <description>&lt;P&gt;field=_raw is implied if you don't specify it. Although, I do put it in all of mine, just for good practice.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 03:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149089#M41649</guid>
      <dc:creator>ShaneNewman</dc:creator>
      <dc:date>2013-11-20T03:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149090#M41650</link>
      <description>&lt;P&gt;To make the extractions more permanent;&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
&lt;CODE&gt;[server_sourcetype]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;EXTRACT-srv_login = (?&amp;lt;userID&amp;gt;\w+)\slogged\sin&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[vpn_sourcetype]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;EXTRACT-vpn_login = (?&amp;lt;userID&amp;gt;\w+)\slogged\sin&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 09:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149090#M41650</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-20T09:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149091#M41651</link>
      <description>&lt;P&gt;Thanks everyone. I did a bad job on the examples. My login id is in the format d123450.  However, that could be anywhere in the event. How would I grab that, since it could be anywhere, and, more importantly, how do I look for that id across two different searches?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 13:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149091#M41651</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-11-20T13:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149092#M41652</link>
      <description>&lt;P&gt;Then can you provide more examples? a complete _raw values would be great.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 16:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149092#M41652</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-20T16:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149093#M41653</link>
      <description>&lt;P&gt;If the format of your userid is X123456 (start with character and then bunch of digits), following regex should be able to extract userid from any place within the string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;userId&amp;gt;[a-zA-Z][0-9][^ ]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Nov 2013 16:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149093#M41653</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-20T16:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do i capture login ID as the same field across two differently-formatted logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149094#M41654</link>
      <description>&lt;P&gt;But you run the risk of getting some other useless info this way. With a pattern so unspecific, you basically need to anchor the regex to some known surrounding string.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2013 09:23:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-capture-login-ID-as-the-same-field-across-two/m-p/149094#M41654</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-25T09:23:39Z</dc:date>
    </item>
  </channel>
</rss>

