<?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: mvexpand not extracting all key/value pairs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/635089#M220643</link>
    <description>&lt;P&gt;I had indeed resolved it using in the mean time:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| extract pairdelim="," kvdelim="=" clean_keys=t&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2023 08:09:18 GMT</pubDate>
    <dc:creator>jmartens</dc:creator>
    <dc:date>2023-03-20T08:09:18Z</dc:date>
    <item>
      <title>Why is mvexpand not extracting all key/value pairs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634789#M220534</link>
      <description>&lt;P&gt;I am trying to expand multiple fields from specific log lines using mvexpand but for some strange reason some fields are not extracted as expected, see screenshot for an example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmartens_0-1678980355806.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24343iA804E573831F3279/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmartens_0-1678980355806.png" alt="jmartens_0-1678980355806.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would also like to have the key/value pairs for col and gantry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 16:04:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634789#M220534</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2023-03-17T16:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand not extracting all key/value pairs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634824#M220551</link>
      <description>&lt;P&gt;This is not an &lt;FONT face="courier new,courier"&gt;mvexpand&lt;/FONT&gt; problem because the values field is not a multi-value field.&amp;nbsp; We know it can't be a multi-value field because the &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; command does not use the &lt;FONT face="courier new,courier"&gt;max_match&lt;/FONT&gt; option, which means only the first match of the regex will be extracted.&lt;/P&gt;&lt;P&gt;The fields that were extracted probably are the result of automatic extraction because they're in key=value format.&amp;nbsp; I can't explain why the col and gantry fields were not extracted.&lt;/P&gt;&lt;P&gt;What is the end goal of this query?&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;mvexpand&lt;/FONT&gt; command puts each value of a multi-value field into a new event - is that what is desired?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:13:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634824#M220551</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-16T20:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand not extracting all key/value pairs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634979#M220591</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We know it can't be a multi-value field because the &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; command does not use the &lt;FONT face="courier new,courier"&gt;max_match&lt;/FONT&gt; option, which means only the first match of the regex will be extracted.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't see why the regex here is such a proof. The `rex` is used to extract two named fields, of which the latter contains the values I am after and is assigned to values. I see no reason why `max_match` is even relevant here.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;What is the end goal of this query?&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;mvexpand&lt;/FONT&gt; command puts each value of a multi-value field into a new event - is that what is desired?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The end goal is to extract all values (as per column headings from the results in my screenshot) from value field extracted using the regular expression and assigning them to the event so I can process and plot these values.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 19:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634979#M220591</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2023-03-17T19:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand not extracting all key/value pairs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634981#M220592</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;max_match&lt;/FONT&gt; option is relevant because its absence tells me we're not dealing with a mutli-value field and so the &lt;FONT face="courier new,courier"&gt;mvexpand&lt;/FONT&gt; command is not of use.&lt;/P&gt;&lt;P&gt;To get each component of the values field into its own field we need to parse it.&amp;nbsp; There is the &lt;FONT face="courier new,courier"&gt;extract&lt;/FONT&gt; command, but it only works with _raw so we have to jump through some hoops to use it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;&amp;lt;your search to extract the values field&amp;gt;&amp;gt;
| eval _raw = values
| extract pairdelim=, kvdelim==
| table values count max min avg col gantry energy&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 19:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/634981#M220592</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-17T19:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: mvexpand not extracting all key/value pairs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/635089#M220643</link>
      <description>&lt;P&gt;I had indeed resolved it using in the mean time:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| extract pairdelim="," kvdelim="=" clean_keys=t&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 08:09:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-mvexpand-not-extracting-all-key-value-pairs/m-p/635089#M220643</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2023-03-20T08:09:18Z</dc:date>
    </item>
  </channel>
</rss>

