<?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: Splunk to split 1 json entry with multiple event times into multiple entries with multiple event times in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-to-split-1-json-entry-with-multiple-event-times-into/m-p/456379#M170515</link>
    <description>&lt;P&gt;Assuming you have those 2 fields extracted as multivalued fields &lt;CODE&gt;eventsizes&lt;/CODE&gt; and &lt;CODE&gt;eventtimes&lt;/CODE&gt;, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
| eval eventdetails = mvzip(eventsizes,eventtimes,";")
| mvexpand eventdetails
| rex field=eventdetails "^(?&amp;lt;eventsize&amp;gt;[^;]+);(?&amp;lt;eventtime&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The mvzip joins the 2 multivalued fields row by row into a single multivalued field with &lt;CODE&gt;;&lt;/CODE&gt; separated eventsize and eventtime values.&lt;BR /&gt;
The mvexpand explodes that into separate events (copying all other field values like flowKey&lt;BR /&gt;
The rex is then used to extract the two parts from the eventdetails field.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2019 12:31:37 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2019-07-04T12:31:37Z</dc:date>
    <item>
      <title>Splunk to split 1 json entry with multiple event times into multiple entries with multiple event times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-to-split-1-json-entry-with-multiple-event-times-into/m-p/456378#M170514</link>
      <description>&lt;P&gt;Hi Splunk community &lt;/P&gt;

&lt;P&gt;My data in json format has 1 entry in Splunk that contain 1 event size and 1 event time for the same flowKey like the following:&lt;/P&gt;

&lt;P&gt;{"_id":{"$oid":"dfkahu13fd"},"flowKey":"null,null,...", "size_of_events":[1.1121358e+08],"time_of_events":[{"$numberLong":"1548454548"}],...}&lt;/P&gt;

&lt;P&gt;I also have 1 entry with multiple event size and event time for another flowKey which looks like the following:&lt;/P&gt;

&lt;P&gt;{"_id":{"$oid":"dfsahu13fd"},"flowKey":"null,null,...", "size_of_events":[1.1121356e+08,1.1121357e+08,1.1121357e+08,1.1121358e+08],"time_of_events":[{"$numberLong":"1548454548"},{"$numberLong":"1548454549"},{"$numberLong":"1548454555"},{"$numberLong":"1548454559"}],...}&lt;/P&gt;

&lt;P&gt;Pls advise how I can break the latter one into 4 events with the same flowKey. My aim is to show using a timechart with x as event time and y as event size for all entries.&lt;BR /&gt;
Hopefully I can hack it in search. Am not good with props.conf. &lt;BR /&gt;
Many thanks in advance. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-to-split-1-json-entry-with-multiple-event-times-into/m-p/456378#M170514</guid>
      <dc:creator>sssignals</dc:creator>
      <dc:date>2020-09-30T01:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to split 1 json entry with multiple event times into multiple entries with multiple event times</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-to-split-1-json-entry-with-multiple-event-times-into/m-p/456379#M170515</link>
      <description>&lt;P&gt;Assuming you have those 2 fields extracted as multivalued fields &lt;CODE&gt;eventsizes&lt;/CODE&gt; and &lt;CODE&gt;eventtimes&lt;/CODE&gt;, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
| eval eventdetails = mvzip(eventsizes,eventtimes,";")
| mvexpand eventdetails
| rex field=eventdetails "^(?&amp;lt;eventsize&amp;gt;[^;]+);(?&amp;lt;eventtime&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The mvzip joins the 2 multivalued fields row by row into a single multivalued field with &lt;CODE&gt;;&lt;/CODE&gt; separated eventsize and eventtime values.&lt;BR /&gt;
The mvexpand explodes that into separate events (copying all other field values like flowKey&lt;BR /&gt;
The rex is then used to extract the two parts from the eventdetails field.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 12:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-to-split-1-json-entry-with-multiple-event-times-into/m-p/456379#M170515</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-04T12:31:37Z</dc:date>
    </item>
  </channel>
</rss>

