<?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 make extract command overwrite fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64678#M15977</link>
    <description>&lt;P&gt;I have a field that looks like this:&lt;BR /&gt;
key1=value1*key2=value2*key3=value3&lt;/P&gt;

&lt;P&gt;I put in a stanza in transforms that looks like this:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
[star_equals]&lt;BR /&gt;
SOURCE_KEY=my_field&lt;BR /&gt;
DELIMS="*" "="&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then I run a search like this:&lt;/P&gt;

&lt;P&gt;index=something | extract star_equals&lt;/P&gt;

&lt;P&gt;That works great for everything except the first key/value pair.&lt;/P&gt;

&lt;P&gt;When splunk first does it's auto extract, it thinks&lt;BR /&gt;
key1 has a value of value1*key2=value2*...&lt;/P&gt;

&lt;P&gt;When I run the extract command, the value for key1 does not get overwritten.&lt;/P&gt;

&lt;P&gt;I can't turn off splunk auto extractions (too much other stuff would break).&lt;/P&gt;

&lt;P&gt;If I put in a "field - key1" before the extract, eveything works great, but I won't know what the first key will be, so that's not an option.&lt;/P&gt;

&lt;P&gt;Any other ideas?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:49:51 GMT</pubDate>
    <dc:creator>kkalmbach</dc:creator>
    <dc:date>2020-09-28T09:49:51Z</dc:date>
    <item>
      <title>make extract command overwrite fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64678#M15977</link>
      <description>&lt;P&gt;I have a field that looks like this:&lt;BR /&gt;
key1=value1*key2=value2*key3=value3&lt;/P&gt;

&lt;P&gt;I put in a stanza in transforms that looks like this:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
[star_equals]&lt;BR /&gt;
SOURCE_KEY=my_field&lt;BR /&gt;
DELIMS="*" "="&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then I run a search like this:&lt;/P&gt;

&lt;P&gt;index=something | extract star_equals&lt;/P&gt;

&lt;P&gt;That works great for everything except the first key/value pair.&lt;/P&gt;

&lt;P&gt;When splunk first does it's auto extract, it thinks&lt;BR /&gt;
key1 has a value of value1*key2=value2*...&lt;/P&gt;

&lt;P&gt;When I run the extract command, the value for key1 does not get overwritten.&lt;/P&gt;

&lt;P&gt;I can't turn off splunk auto extractions (too much other stuff would break).&lt;/P&gt;

&lt;P&gt;If I put in a "field - key1" before the extract, eveything works great, but I won't know what the first key will be, so that's not an option.&lt;/P&gt;

&lt;P&gt;Any other ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64678#M15977</guid>
      <dc:creator>kkalmbach</dc:creator>
      <dc:date>2020-09-28T09:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: make extract command overwrite fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64679#M15978</link>
      <description>&lt;P&gt;Can you include the character that is before the first field in DELIMS?&lt;/P&gt;&lt;BR /&gt;
or if this is a sub part of the log, can you extract all the fields as one field, then process that field in a seperate regex?&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2011 13:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64679#M15978</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-08-29T13:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: make extract command overwrite fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64680#M15979</link>
      <description>&lt;P&gt;Thanks for the idea,&lt;BR /&gt;
I'm not really following what you meant in the second part (this field is a subpart of the entire event).  I do have this part extracted into a field.  Are you talking about a new section in the transforms.prop file?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2011 18:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64680#M15979</guid>
      <dc:creator>kkalmbach</dc:creator>
      <dc:date>2011-08-29T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: make extract command overwrite fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64681#M15980</link>
      <description>&lt;P&gt;if you have something like this:&lt;BR /&gt;
Aug 30 12:34:54 &lt;HOST&gt; &lt;STUFF&gt; "key1=value1*key2=value2*key3=value3"&lt;BR /&gt;
then you can extract the keys as a single field.&lt;BR /&gt;
From this field, you can then extract your keys.&lt;/STUFF&gt;&lt;/HOST&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:50:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/make-extract-command-overwrite-fields/m-p/64681#M15980</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2020-09-28T09:50:59Z</dc:date>
    </item>
  </channel>
</rss>

