<?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 get two lines of JSON to break as two events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144845#M29567</link>
    <description>&lt;P&gt;If you are unsure if sstime wont be in the message the you could just set it to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ^\{ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which will tell Splunk to break a new event if the beginning of the line begins with a "{".&lt;/P&gt;

&lt;P&gt;Go ahead and add this into a new props.conf and let me know how it works for you.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2014 15:12:18 GMT</pubDate>
    <dc:creator>aaronkorn</dc:creator>
    <dc:date>2014-09-30T15:12:18Z</dc:date>
    <item>
      <title>How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144841#M29563</link>
      <description>&lt;P&gt;I am using a simple receiver to upload some lines of JSON. The input file has one JSON object (hash) per line, terminated with a newline. When I upload 12 JSON objects, they report as 10 events. In the cases where I get the 2-for-1 behavior, there is an Object (hash) that embeds another Object (hash) in the second of the two lines. For example, these two lines come back as one event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"sstime":1411843443,"value":"151236","event_id":"_view_","d1":"eng","d2":"primary","device_time":"2014-09-27 18:44:03","obj_type":"v","format":"2","rev":"1","version":"1.2.15","device_id":"86ec200468586be","appl_id":15204}
{"sstime":1411843443,"value":{"url":"local_data_53786/eng_welcome_primary.mp3","name":"welcome_primary"},"event_id":"_audiostart_","d1":"eng","d2":"primary","device_time":"2014-09-27 18:44:04","obj_type":"","audio_url":"local_data_53786/eng_welcome_primary.mp3","audio_name":"welcome_primary","format":"2","rev":"1","version":"1.2.15","device_id":"86ec200468586be","appl_id":15204}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see, the second Object has a key with the name "value" that defines a subordinate Object. All the problem lines, are like this pair. Does anyone know how to get Splunk to recognize these are two events?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 20:30:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144841#M29563</guid>
      <dc:creator>fitterman</dc:creator>
      <dc:date>2014-09-29T20:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144842#M29564</link>
      <description>&lt;P&gt;You will want to modify your prop.conf stanza, specifically the LINE_BREAKER option.&lt;/P&gt;

&lt;P&gt;Give this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = \{\"sstime
TIME_PREFIX = sstime\"\:
MAX_TIMESTAMP_LOOKAHEAD = 10
TIME_FORMAT = %s
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Sep 2014 21:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144842#M29564</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2014-09-29T21:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144843#M29565</link>
      <description>&lt;P&gt;You will  want to restart your indexer after the change also this wont apply to events that have already been indexed.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 21:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144843#M29565</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2014-09-29T21:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144844#M29566</link>
      <description>&lt;P&gt;I'm truly a newb, so bear with me. We don't have such a file, but can add one. I guess this means we're getting a default file.&lt;/P&gt;

&lt;P&gt;So my real problem with your suggestion is that because there's no assurance that the "sstime" element will be the first in the object definition, this can't be used. I want it to break every time it gets a complete hash. Is there a way to tell it to break after each complete object?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 14:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144844#M29566</guid>
      <dc:creator>fitterman</dc:creator>
      <dc:date>2014-09-30T14:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144845#M29567</link>
      <description>&lt;P&gt;If you are unsure if sstime wont be in the message the you could just set it to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ^\{ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which will tell Splunk to break a new event if the beginning of the line begins with a "{".&lt;/P&gt;

&lt;P&gt;Go ahead and add this into a new props.conf and let me know how it works for you.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 15:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144845#M29567</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2014-09-30T15:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144846#M29568</link>
      <description>&lt;P&gt;In the end, I added a new props.conf, but just turned off the default line merging, as for this source, I know for certain that the newline only occurs between each event.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::stats-ziploader.production]
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 22:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144846#M29568</guid>
      <dc:creator>fitterman</dc:creator>
      <dc:date>2014-09-30T22:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get two lines of JSON to break as two events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144847#M29569</link>
      <description>&lt;P&gt;If we have the  &lt;CODE&gt;LINE_BREAKER = ^\{&lt;/CODE&gt; then what will happen to nested Json?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 02:26:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-two-lines-of-JSON-to-break-as-two-events/m-p/144847#M29569</guid>
      <dc:creator>rchotalia</dc:creator>
      <dc:date>2017-11-15T02:26:36Z</dc:date>
    </item>
  </channel>
</rss>

