<?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 How can I split JSON into multiple events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431190#M174222</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;can anyone help me a bit? i am trying to split an event in more lines or more events, every events got multiple lines starting with the below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"class":
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what i want is to parse every line as separated event&lt;/P&gt;

&lt;P&gt;i tried with line breaker and event breaker, but i am not really god at regex&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:/opt/api/shared/log/sidekiq.log]
EVENT_BREAKER = ([\r\n]+)
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also i got this error message in splunkd.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AggregatorMiningProcessor - Changing breaking behavior for event stream because MAX_EVENTS (256) was exceeded without a single event break. Will set BREAK_ONLY_BEFORE_DATE to False, and unset any MUST_NOT_BREAK_BEFORE or MUST_NOT_BREAK_AFTER rules. Typically this will amount to treating this data as single-line only. - data_source="/log/sidekiq.log", data_host="blabla", data_sourcetype="ruby_on_rails"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 12:40:21 GMT</pubDate>
    <dc:creator>0xlc</dc:creator>
    <dc:date>2018-12-07T12:40:21Z</dc:date>
    <item>
      <title>How can I split JSON into multiple events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431190#M174222</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;can anyone help me a bit? i am trying to split an event in more lines or more events, every events got multiple lines starting with the below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"class":
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what i want is to parse every line as separated event&lt;/P&gt;

&lt;P&gt;i tried with line breaker and event breaker, but i am not really god at regex&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:/opt/api/shared/log/sidekiq.log]
EVENT_BREAKER = ([\r\n]+)
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also i got this error message in splunkd.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AggregatorMiningProcessor - Changing breaking behavior for event stream because MAX_EVENTS (256) was exceeded without a single event break. Will set BREAK_ONLY_BEFORE_DATE to False, and unset any MUST_NOT_BREAK_BEFORE or MUST_NOT_BREAK_AFTER rules. Typically this will amount to treating this data as single-line only. - data_source="/log/sidekiq.log", data_host="blabla", data_sourcetype="ruby_on_rails"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 12:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431190#M174222</guid>
      <dc:creator>0xlc</dc:creator>
      <dc:date>2018-12-07T12:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I split JSON into multiple events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431191#M174223</link>
      <description>&lt;P&gt;Hi! I think you are missing a colon in the first line. Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/opt/api/shared/log/sidekiq.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;instead of&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:/opt/api/shared/log/sidekiq.log]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 14:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431191#M174223</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2018-12-07T14:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I split JSON into multiple events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431192#M174224</link>
      <description>&lt;P&gt;well that did the trick! Thanks&lt;/P&gt;

&lt;P&gt;now i need to parse the nested list inside the same line.&lt;/P&gt;

&lt;P&gt;i'll have a look around here propably there is already the answer&lt;/P&gt;

&lt;P&gt;i am trying with spath but is not working&lt;/P&gt;

&lt;P&gt;i got something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"class":"EventsWorker","args":["{\"id\"=187918,....]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i can't extract args, i tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mysearch | spath path=args{} output=args
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 16:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-split-JSON-into-multiple-events/m-p/431192#M174224</guid>
      <dc:creator>0xlc</dc:creator>
      <dc:date>2018-12-07T16:27:09Z</dc:date>
    </item>
  </channel>
</rss>

