<?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 Multiple key value pair extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100019#M25856</link>
    <description>&lt;P&gt;I have multiple key value pairs in a line like so:&lt;BR /&gt;
summary=" Policy Rule modified" summary=" Policy Rule number 2 modified" details="Details line 1" details="Details line 2" ... details="Details line X". &lt;/P&gt;

&lt;P&gt;Nothing I'm doing provides an easy way to either concatenate or preferably create keys with increasing numerical sequence, eg summary=, summary2=, etc. I've tried the MV_ADD and REPEAT_MATCH transform options without result. What do I need? It feels like something basic I'm missing but I can't put my finger on it. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mytype]
REGEX = details=(\S+)
FORMAT = details::$1
REPEAT_MATCH = true

REGEX = summary=(\S+)
FORMAT = summary::$1
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:33:11 GMT</pubDate>
    <dc:creator>timbCFCA</dc:creator>
    <dc:date>2020-09-28T09:33:11Z</dc:date>
    <item>
      <title>Multiple key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100019#M25856</link>
      <description>&lt;P&gt;I have multiple key value pairs in a line like so:&lt;BR /&gt;
summary=" Policy Rule modified" summary=" Policy Rule number 2 modified" details="Details line 1" details="Details line 2" ... details="Details line X". &lt;/P&gt;

&lt;P&gt;Nothing I'm doing provides an easy way to either concatenate or preferably create keys with increasing numerical sequence, eg summary=, summary2=, etc. I've tried the MV_ADD and REPEAT_MATCH transform options without result. What do I need? It feels like something basic I'm missing but I can't put my finger on it. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mytype]
REGEX = details=(\S+)
FORMAT = details::$1
REPEAT_MATCH = true

REGEX = summary=(\S+)
FORMAT = summary::$1
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100019#M25856</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2020-09-28T09:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100020#M25857</link>
      <description>&lt;P&gt;timbCFCA,&lt;BR /&gt;&lt;BR /&gt;
The &lt;CODE&gt;MV_ADD&lt;/CODE&gt; transforms settings is what you want here.  &lt;CODE&gt;REPEAT_MATCH&lt;/CODE&gt; is only valid @ index time.  Given the following sample the following configs will be valid:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;summary=" Policy Rule modified" summary=" Policy Rule number 2 modified" details="Details line 1" details="Details line 2" ... details="Details line X"

## props.conf
[&amp;lt;your_sourcetype&amp;gt;]
REPORT-details_for_your_sourcetype = details_for_your_sourcetype
REPORT-summary_for_your_sourcetype = summary_for_your_sourcetype

## transforms.conf
[details_for_your_sourcetype]
# Assuming quoted strings
REGEX = details=\"([^"]+)
FORMAT = details::$1
MV_ADD = True

[summary_for_your_sourcetype]
# Assuming quoted strings
REGEX = summary=\"([^"]+)
FORMAT = summary::$1
MV_ADD = True
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 May 2011 18:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100020#M25857</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-05-11T18:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100021#M25858</link>
      <description>&lt;P&gt;hazedav, many thanks. I realized that I needed to define two separate entries in props.conf just as I received your response. I went a touch different route for the regex. I'll post just in case anyone comes across this. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[forechange_details]
REGEX = details=\"(.+?)\"
FORMAT = details::$1
MV_ADD = true

[forechange_summary]
REGEX = summary=\"(.+?)\"
FORMAT = summary::$1
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 May 2011 19:13:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100021#M25858</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-05-11T19:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple key value pair extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100022#M25859</link>
      <description>&lt;P&gt;I am experiencing this same issue. I would have thought that using "| extract mv_add=true" would fix it in the search interface, but that appears to have no effect. Has anybody experienced that?&lt;/P&gt;

&lt;P&gt;I'm able to easily solve this using "| rex ... max_match=50", but that seems like it ought to be unnecessary.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 01:57:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-key-value-pair-extraction/m-p/100022#M25859</guid>
      <dc:creator>supersleepwalke</dc:creator>
      <dc:date>2012-05-31T01:57:45Z</dc:date>
    </item>
  </channel>
</rss>

