<?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 break a json log in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519044#M87796</link>
    <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;I have a json log that in a single json contains many events:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"response":{"caseEvents":[{"eventDetails":{"eventDescription":"SCT","eventId":"TRX8551","eventTime":"2020-06-24T13:21:00.664+00:00","eventType":"PAYMENT"}},{"eventDetails":{"eventDescription":"SCT","eventId":"TRX8552","eventTime":"2020-06-24T13:21:01.664+00:00","eventType":"PAYMENT"}}}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the same json I have many&amp;nbsp;eventDetails section (here only two with few fields, but they are many more).&lt;/P&gt;&lt;P&gt;I tried to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; indexed_extractions=JSON&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LINE_BREAKER  = \{\"eventDetails\"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it still remains one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I approach the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2020 11:00:21 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-11T11:00:21Z</dc:date>
    <item>
      <title>break a json log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519044#M87796</link>
      <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;I have a json log that in a single json contains many events:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"response":{"caseEvents":[{"eventDetails":{"eventDescription":"SCT","eventId":"TRX8551","eventTime":"2020-06-24T13:21:00.664+00:00","eventType":"PAYMENT"}},{"eventDetails":{"eventDescription":"SCT","eventId":"TRX8552","eventTime":"2020-06-24T13:21:01.664+00:00","eventType":"PAYMENT"}}}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the same json I have many&amp;nbsp;eventDetails section (here only two with few fields, but they are many more).&lt;/P&gt;&lt;P&gt;I tried to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; indexed_extractions=JSON&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LINE_BREAKER  = \{\"eventDetails\"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it still remains one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I approach the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 11:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519044#M87796</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-11T11:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: break a json log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519049#M87799</link>
      <description>&lt;P&gt;would there be any option to split them before indexing to Splunk? instead of depending on props.conf , is it possible to make changes in modular inputs if you are using one?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 11:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519049#M87799</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-11T11:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: break a json log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519056#M87802</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'd like to avoid to pre-elaborate the source with a script before indexing!&lt;/P&gt;&lt;P&gt;I'd like to find a way to split events in Splunk.&lt;/P&gt;&lt;P&gt;Have you another idea?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 12:53:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519056#M87802</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-11T12:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: break a json log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519061#M87804</link>
      <description>&lt;P&gt;Well, depending on the formatting of the json log files, you at least need the following in props.conf:&lt;/P&gt;&lt;P&gt;SHOULD_LINEMERGE = false&lt;/P&gt;&lt;P&gt;If the data is not prettyprinted, the following should help:&lt;/P&gt;&lt;P&gt;LINE_BREAKER= \}(,)\{&lt;/P&gt;&lt;P&gt;If the data is prettyprinted, the following may be used to allow for whitespaces between the comma and the curly brace:&lt;/P&gt;&lt;P&gt;LINE_BREAKER = \}(,\s*)\{&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 13:23:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519061#M87804</guid>
      <dc:creator>uwehermann</dc:creator>
      <dc:date>2020-09-11T13:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: break a json log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519259#M87821</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please have a look at below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ __auto__learned__ ]
SHOULD_LINEMERGE=true
LINE_BREAKER=(\{\"eventDetails\"\:)
NO_BINARY_CHECK=true
SEDCMD-tailchars=s/(.*\"\}{1}).*/\1/g&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Added SEDCMD class to remove unwanted characters at end of the line.&lt;/P&gt;&lt;P&gt;you need to deal with pre-text which is in first event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="json-parser-1.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10798i2EA69168D75D2B8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="json-parser-1.png" alt="json-parser-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 06:38:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/break-a-json-log/m-p/519259#M87821</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-13T06:38:48Z</dc:date>
    </item>
  </channel>
</rss>

