<?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 to extract field:value pairs from within the value of other field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228112#M67426</link>
    <description>&lt;P&gt;Let's make sure that we are talking about the same things; see here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/504719/splunk-for-windows-app-on-standalone-instance.html"&gt;https://answers.splunk.com/answers/504719/splunk-for-windows-app-on-standalone-instance.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 21:35:08 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-02-28T21:35:08Z</dc:date>
    <item>
      <title>How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228100#M67414</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We are capturing a custom log from Windows event viewer using Splunk forwarder. Most of the fields are extracted properly in &lt;CODE&gt;field:value&lt;/CODE&gt; format, except one  where the data itself contains sub-fields with their own values. &lt;/P&gt;

&lt;P&gt;I tried creating reg-ex field extractions but it only identified in 1 or 2 events and keeps failing for other.&lt;BR /&gt;
e.g. Below is a sanitized version of the event we see. All fields from &lt;CODE&gt;LogName&lt;/CODE&gt; to &lt;CODE&gt;Keywords&lt;/CODE&gt; are parsed correctly, except when it reached &lt;CODE&gt;Message&lt;/CODE&gt;. This field itself contains other items e.g. &lt;CODE&gt;Client&lt;/CODE&gt;, &lt;CODE&gt;Computer&lt;/CODE&gt;, or &lt;CODE&gt;Action&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;What is the best way to extract these fields as well? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08/12/2016 10:23:03 AM
LogName=xxxxxxxxx
SourceName=xxxxxxxxx
EventCode=3
EventType=4
Type=Information
ComputerName=Name.x.y.z.local
User=aaaa
Sid=S-1-5-7
SidType=5
TaskCategory=%1
OpCode=None
RecordNumber=1234567
Keywords=Classic
Message=AD object was successfully modified.
        Client Computer : w.x.y.z
        Object DN : CN=Username,OU=Junior,DC=x,DC=y,DC=z,DC=local
        Object Class : user
        Object GUID : CN=Username,OU=Junior,DC=x,DC=y,DC=z,DC=local     Attribute Name : logonCount
        Action : Update
        Old Value : 1234
        New Value : 1235
        Request ID : {84E5C0C7-84E5C0C7-84E5C0C7-84E5C0C7}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Aug 2016 15:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228100#M67414</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2016-08-12T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228101#M67415</link>
      <description>&lt;P&gt;You can do this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=foo | rex field=ORIGINAL_FILED_NAME "(?&amp;lt;NEW_FILED_NAME&amp;gt;\w+)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will  do a regular expression and extract data from your first field (ORIGINAL_FIELD_NAME) and create a second field (NEW_FILED_NAME) with the extracted value &lt;/P&gt;

&lt;P&gt;I'm not sure what second field you want extracted, give us more details and I'll write the regex for you &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228101#M67415</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-09-29T10:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228102#M67416</link>
      <description>&lt;P&gt;If you want to extract only the string after message= but not the other lines, you have to insert \n at the end of your regex, see below:&lt;BR /&gt;
   Message=(?.*)\n&lt;BR /&gt;
if you want to try this regex use &lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt;&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 15:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228102#M67416</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-08-12T15:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228103#M67417</link>
      <description>&lt;P&gt;Hi skoelpin, &lt;/P&gt;

&lt;P&gt;Thank you for the response.&lt;/P&gt;

&lt;P&gt;From the "Message" field in above example, we would like to extract all the sub-field, i.e. Client Computer, Object DN, Object Class, Object GUID, Action, Old Value, New Value and Request ID. It will become much easier to create dashboards and alerts if all these are their own field:value pair instead of being part of original "Message" field. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 15:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228103#M67417</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2016-08-12T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228104#M67418</link>
      <description>&lt;P&gt;it's the same thing :&lt;BR /&gt;
Client Computer : (? .&lt;EM&gt;)\n&lt;BR /&gt;
Object DN : (? .&lt;/EM&gt;)\n&lt;BR /&gt;
Object Class : (? .&lt;EM&gt;)\n&lt;BR /&gt;
Object GUID : (? .&lt;/EM&gt;)\n&lt;BR /&gt;
Action : (? .&lt;EM&gt;)\n&lt;BR /&gt;
Old Value : (? .&lt;/EM&gt;)\n&lt;BR /&gt;
New Value : (? .&lt;EM&gt;)\n&lt;BR /&gt;
Request ID : (? .&lt;/EM&gt;)&lt;BR /&gt;
You have to extract every field inserting \n at the end&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 15:57:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228104#M67418</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-08-12T15:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228105#M67419</link>
      <description>&lt;P&gt;I would recommend extracting these sub-fields at search time in your  &lt;CODE&gt;props.conf&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;So you would go to your &lt;CODE&gt;props.conf&lt;/CODE&gt; and go to your stanza and add this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YOUR_SOURCETYPE]
EXTRACT-GUID = ((?&amp;lt;=CN\=|OU\=|DC\=)\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 16:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228105#M67419</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-12T16:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228106#M67420</link>
      <description>&lt;P&gt;If you looking to extract this in the search screen, you could use the &lt;CODE&gt;extract&lt;/CODE&gt; command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | extract kvdelim=" : " pairdelim="\n"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Extract"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Extract&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 17:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228106#M67420</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-12T17:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228107#M67421</link>
      <description>&lt;P&gt;You can install the &lt;CODE&gt;Windows_TA&lt;/CODE&gt; app and it should do field extractions for you.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 15:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228107#M67421</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-08-15T15:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228108#M67422</link>
      <description>&lt;P&gt;Hi skoelpin,&lt;/P&gt;

&lt;P&gt;I tried this but didn't work. Just to make sure, this needs to be added under the system/local/props.conf correct? because we also have Splunk_TA_windows addon installed which has it's own props.conf.&lt;/P&gt;

&lt;P&gt;I also came across another answer but again, none of the changes take effect. &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/49310/field-extraction-in-message-field-of-windows-event-log.html" target="_blank"&gt;https://answers.splunk.com/answers/49310/field-extraction-in-message-field-of-windows-event-log.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am not sure If I am editing/adding extractions at the wrong location? or if it's because the source/sourcetype contains white spaces, although I tried adding a wildcard * but in vain.&lt;BR /&gt;
source=[WinEventLog:XXX Y Z]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228108#M67422</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2020-09-29T10:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228109#M67423</link>
      <description>&lt;P&gt;Hi woodcock,&lt;/P&gt;

&lt;P&gt;We have Splunk_TA_windows installed on both the Search head as well as the forwarder sending these events, but the Message field still the same. Entire Message is clubbed into one big string. &lt;/P&gt;

&lt;P&gt;We also tried moving the monitor stanza on the universal forwarder from the system/local/inputs.conf to inputs.conf for windows TA, but it still behaves the same way. &lt;/P&gt;

&lt;P&gt;~ Abhi&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:45:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228109#M67423</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2020-09-29T10:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228110#M67424</link>
      <description>&lt;P&gt;Based on the fields currently being extracted for windows event's, it looks like the props from Windows TA is contributing as well. I am not sure if this takes precedence over /local/props.conf or if both work together. &lt;/P&gt;

&lt;P&gt;Is there a way to figure out which extractions/transforms and from which location are being used for a specific sourcetype. &lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 16:08:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228110#M67424</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2016-08-26T16:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228111#M67425</link>
      <description>&lt;P&gt;I'm having the same issue with the windows TA installed as well.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 12:46:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228111#M67425</guid>
      <dc:creator>tred23</dc:creator>
      <dc:date>2017-02-27T12:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field:value pairs from within the value of other field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228112#M67426</link>
      <description>&lt;P&gt;Let's make sure that we are talking about the same things; see here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/504719/splunk-for-windows-app-on-standalone-instance.html"&gt;https://answers.splunk.com/answers/504719/splunk-for-windows-app-on-standalone-instance.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 21:35:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-value-pairs-from-within-the-value-of-other/m-p/228112#M67426</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-02-28T21:35:08Z</dc:date>
    </item>
  </channel>
</rss>

