<?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 extract a field from another field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433495#M123749</link>
    <description>&lt;P&gt;Something in the spirit of &lt;CODE&gt;.*source=(?&amp;lt;source&amp;gt;\w*).*dom=(?&amp;lt;dom&amp;gt;\w*)&lt;/CODE&gt;...&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 00:54:34 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2018-12-11T00:54:34Z</dc:date>
    <item>
      <title>How do I extract a field from another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433494#M123748</link>
      <description>&lt;P&gt;I have an event in the following format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-12-10 15:15:40 [Thread-34-TestBolt-executor[4 4]] INFO  com.learn.code.StringQ.execute:67 - Bolt=StringQBolt | source=XYZ | dom=xyz| groupId=21239 | npid=ABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These are already part of the "message" field. How do I extract npid, groupId, dom, source as different fields? These should be extracted as fields going forward. &lt;/P&gt;

&lt;P&gt;Any pointers are appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 00:28:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433494#M123748</guid>
      <dc:creator>rohinisb91</dc:creator>
      <dc:date>2018-12-11T00:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433495#M123749</link>
      <description>&lt;P&gt;Something in the spirit of &lt;CODE&gt;.*source=(?&amp;lt;source&amp;gt;\w*).*dom=(?&amp;lt;dom&amp;gt;\w*)&lt;/CODE&gt;...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 00:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433495#M123749</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-12-11T00:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433496#M123750</link>
      <description>&lt;P&gt;hello there:&lt;/P&gt;

&lt;P&gt;runt this search anywhere:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| eval _raw = "2018-12-10 15:15:40 [Thread-34-TestBolt-executor[4 4]] INFO  com.learn.code.StringQ.execute:67 - Bolt=StringQBolt | source=XYZ | dom=xyz| groupId=21239 | npid=ABC"
| rex field=_raw "(?&amp;lt;time&amp;gt;\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2})\s+\[(?&amp;lt;something&amp;gt;[^\[]+)\[(?&amp;lt;some_digits&amp;gt;[^\]]+)\]\]\s+(?&amp;lt;log_level&amp;gt;[^\s]+)\s+(?&amp;lt;some_fqdn_maybe&amp;gt;[^\:]+)\:(?&amp;lt;maybe_port&amp;gt;\d+)\s\-\s(?&amp;lt;everything_elde&amp;gt;.+)"
| extract pairdelim="|", kvdelim="=:"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to make it permanent use props.conf&lt;BR /&gt;
you can also use the interactive field extractor&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 01:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433496#M123750</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-12-11T01:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433497#M123751</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval message="2018-12-10 15:15:40 [Thread-34-TestBolt-executor[4 4]] INFO  com.learn.code.StringQ.execute:67 - Bolt=StringQBolt | source=XYZ | dom=xyz| groupId=21239 | npid=ABC"
|rex field=message ".*Bolt\=(?&amp;lt;Bolt&amp;gt;[^\|]+)"
|rex field=message ".*source\=(?&amp;lt;source&amp;gt;[^\|]+)" 
|rex field=message ".*dom\=(?&amp;lt;dom&amp;gt;[^\|]+)" 
|rex field=message ".*groupId\=(?&amp;lt;groupId&amp;gt;[^\|]+)" 
|rex field=message ".*npid\=(?&amp;lt;npid&amp;gt;[^\|]+)" 
|table message Bolt source dom groupId npid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-another-field/m-p/433497#M123751</guid>
      <dc:creator>saurabhkharkar</dc:creator>
      <dc:date>2018-12-27T14:06:41Z</dc:date>
    </item>
  </channel>
</rss>

