<?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 expand multivalue fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115904#M30753</link>
    <description>&lt;P&gt;I would just do a multi-value field extraction, use a table to transform them into separate rows, then do stats/etc. against the table. i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | rex "\naction_serial:\s(?&amp;lt;action_serial&amp;gt;\d+)\naction_start:\s(?&amp;lt;action_start&amp;gt;\d+)\naction_name:\s(?&amp;lt;action_name&amp;gt;\w+)" max_match=0 | table action_serial action_start action_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Mar 2015 13:20:04 GMT</pubDate>
    <dc:creator>masonmorales</dc:creator>
    <dc:date>2015-03-26T13:20:04Z</dc:date>
    <item>
      <title>How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115901#M30750</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;is it possible to split-up/expand an event like this?&lt;/P&gt;

&lt;P&gt;field1=xyz&lt;BR /&gt;
field2=xyz&lt;BR /&gt;
action: [ [-]&lt;BR /&gt;
     { [-]&lt;BR /&gt;
       action_serial: 63&lt;BR /&gt;
       action_start: 1427365806891&lt;BR /&gt;
       action_name: A&lt;BR /&gt;
       params: { [+]&lt;BR /&gt;
       }&lt;BR /&gt;
     }&lt;BR /&gt;
     { [-]&lt;BR /&gt;
       action_serial: 64&lt;BR /&gt;
       action_start: 1427365812718&lt;BR /&gt;
       action_name: B&lt;BR /&gt;
       params: { [+]&lt;BR /&gt;
       }&lt;BR /&gt;
     }&lt;BR /&gt;
     { [-]&lt;BR /&gt;
       action_serial: 65&lt;BR /&gt;
       action_start_utc: 1427365813260&lt;BR /&gt;
       action_name: A&lt;BR /&gt;
       params: { [+]&lt;BR /&gt;
       }&lt;BR /&gt;
     }&lt;BR /&gt;
     { [-]&lt;BR /&gt;
       action_serial: 66&lt;BR /&gt;
       action_start_utc: 1427365813937&lt;BR /&gt;
       action_name: B&lt;BR /&gt;
       params: { [+]&lt;BR /&gt;
       }&lt;BR /&gt;
     }&lt;BR /&gt;
     { [-]&lt;BR /&gt;
       action_serial: 67&lt;BR /&gt;
       action_start_utc: 1427365831792&lt;BR /&gt;
       action_name: C&lt;BR /&gt;
       params: { [+] &lt;/P&gt;

&lt;P&gt;There are 5 actions in the event. I would like to expand this one event into 5 events, where each event includes only one of the actions.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115901#M30750</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-09-28T19:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115902#M30751</link>
      <description>&lt;P&gt;Hi try HeinzWaescher&lt;BR /&gt;
Try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ............  | eval oneaction_by_event=mvdedup(mvappend(field1 ,field2,action))|mvexpand oneaction_by_event|table oneaction_by_event
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Mar 2015 11:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115902#M30751</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-03-26T11:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115903#M30752</link>
      <description>&lt;P&gt;thanks for your post. unfortunately this approach doesn't show the needed results&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2015 13:00:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115903#M30752</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2015-03-26T13:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115904#M30753</link>
      <description>&lt;P&gt;I would just do a multi-value field extraction, use a table to transform them into separate rows, then do stats/etc. against the table. i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | rex "\naction_serial:\s(?&amp;lt;action_serial&amp;gt;\d+)\naction_start:\s(?&amp;lt;action_start&amp;gt;\d+)\naction_name:\s(?&amp;lt;action_name&amp;gt;\w+)" max_match=0 | table action_serial action_start action_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Mar 2015 13:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115904#M30753</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2015-03-26T13:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115905#M30754</link>
      <description>&lt;P&gt;I have tried to set up your file in the variable temp as you peus the contacts below to help get out of a aproche what you veus. and t inspireant my example you will find your answer because it was walking home.&lt;BR /&gt;
try this example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval
temp="{\"action_serial\":\" 63\",\"action_start\": \"1427365806891\",\"action_name\": \"A\",\"params\": \"{ [+]}\"},{\"action_serial\":\" 64\",\"action_start\": \"1427365812718\",\"action_name\":\" B\",\"params\": \"{ [+]}\"},{\"action_serial\":\" 65\",\"action_start_utc\": \"1427365813260\",\"action_name\": \"A\",\"params\": \"{ [+]}\"},{\"action_serial\": \"66\",\"action_start_utc\": \"1427365813937\",\"action_name\": \"B\",\"params\":\" { [+]}\"}"| table temp | rename temp as _raw | spath |rename action_* as *|rename action_*utc as *|rename params as parametre | eval temp=mvzip(serial,mvzip(start,mvzip(name,parametre,"#"),"#"),"#")| mvexpand temp|table serial start name  parametre _raw temp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Mar 2015 13:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115905#M30754</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-03-26T13:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115906#M30755</link>
      <description>&lt;P&gt;We decided to adjust the inputformat. Extracting the fields in every search for this sourcetype was way too complicated.&lt;BR /&gt;
Thanks for your ideas!&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 14:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields/m-p/115906#M30755</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2015-04-09T14:29:03Z</dc:date>
    </item>
  </channel>
</rss>

