<?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: Json line breaking issue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477288#M81937</link>
    <description>&lt;P&gt;you already modify raw log. we can't correct this.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 21:56:46 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-04-17T21:56:46Z</dc:date>
    <item>
      <title>Json line breaking issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477287#M81936</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have exactly same issue as below &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/513703/json-breaking-single-string-into-multiple-events.html" target="_blank"&gt;https://answers.splunk.com/answers/513703/json-breaking-single-string-into-multiple-events.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;so i added below to my props.conf file :&lt;/P&gt;

&lt;P&gt;[_json_source]&lt;BR /&gt;
CHARSET=UTF-8&lt;BR /&gt;
DATETIME_CONFIG = CURRENT&lt;BR /&gt;
KV_MODE = json&lt;BR /&gt;
TRUNCATE = 0&lt;BR /&gt;
SEDCMD-fixfooters=s/]}//g&lt;BR /&gt;
LINE_BREAKER = ([\r\n,]*(?:{[^[{]+[)?){"teamInCharge&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;The events are breaking correctly but the first line is not coming properly, only as raw text and not in json format. &lt;/P&gt;

&lt;P&gt;Could you please help. &lt;/P&gt;

&lt;P&gt;The different between the raw text between the 1st event and 2nd event i saw is at the end of the line. &lt;/P&gt;

&lt;P&gt;1st line ends with below showing other fields along with raw text:&lt;BR /&gt;
{"teamInCharge":[], bla bla,"serialNumber":""}]&lt;/P&gt;

&lt;P&gt;2nd lines ends with below showing syntax highlighted part also&lt;BR /&gt;
{"teamInCharge":[], bla bla,"serialNumber":""} &lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477287#M81936</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2020-09-30T05:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Json line breaking issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477288#M81937</link>
      <description>&lt;P&gt;you already modify raw log. we can't correct this.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 21:56:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477288#M81937</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-17T21:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Json line breaking issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477289#M81938</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/513703/json-breaking-single-string-into-multiple-events.html"&gt;https://answers.splunk.com/answers/513703/json-breaking-single-string-into-multiple-events.html&lt;/A&gt;&lt;BR /&gt;
sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="{\"batch_id\":\"0-39-1490386204359\",\"sampling_rate\":1,\"n\":500,\"events\":[{\"earlyAccess\":null,\"profileId\":\"d037d7da-bd83-11e6-80d6-0a2c5cb56663\",\"ip\":\"74.000.000.238\",\"deviceVersion\":[{\"component\":\"app\",\"build\":\"oncue#1.19.37.108208#mallard2_GA.0\",\"otherDetail\":null},{\"component\":\"service\",\"build\":\"qa-a.stb.fios.tv\",\"otherDetail\":null},{\"component\":\"location\",\"build\":\"1000.00,1000.00\",\"otherDetail\":null},{\"component\":\"Client\",\"build\":\"108208#release_signed\",\"otherDetail\":null}],\"__lane\":\"prod\",\"__host\":\"unknown\",\"navigationStack\":[{\"name\":\"Playback\",\"index\":0,\"type\":\"LINEAR\"}],\"platformVersion\":\"108208#release_signed\",\"assetType\":\"LinearAsset\",\"assetId\":\"50281370fd523ecbaafd8f4d8145e006-adf51f1b5b403b6daa88b62d9c8567fa-2017-03-24-1\",\"restrictedBy\":null,\"programStartTime\":1490380200000,\"attributionId\":\"8cca77ff-1480-b037-b0b2-015b01e09338\",\"assetSessionId\":\"1490386121819\",\"__sourceType\":\"device\",\"serviceTimestamp\":null,\"appVersion\":\"1.19.37.108208\",\"playType\":\"tuneIn\",\"collectionId\":\"\",\"deviceType\":\"501\",\"accountId\":\"1004249\",\"playRate\":1000,\"maestro\":{\"vhoId\":\"\",\"host\":\"qa-a-aws.stb.fios.tv\",\"userAgent\":\"Mozilla/5.0 (STB; CPU 501 OS 108208) OnCue/1.19.37\",\"version\":\"4.4.3851\",\"inHome\":true,\"ipAddress\":\"74.000.000.238\"},\"encoderDelay\":124000,\"__eventId\":\"s9a98hR/sMGKvAFbAe90tQ==\",\"__timestamp\":1490386121909,\"sessionId\":\"617F6EA8-1490385232\",\"__eventName\":\"1\",\"programEndTime\":1490390100000,\"programId\":\"adf51f1b5b403b6daa88b62d9c8567fa\",\"__source\":\"unknown\",\"liveTuneType\":\"live\",\"deviceTimestamp\":1490386121819,\"deviceId\":\"617F6EA8\",\"__eventVersion\":16,\"recordingId\":null,\"channelId\":\"50281370fd523ecbaafd8f4d8145e006\",\"timeZone\":\"America/New_York\",\"eventProgramPoint\":1490386121714},{\"earlyAccess\":null,\"profileId\":\"45737761-ac2b-11e6-80d6-0a2c5cb56663\",\"ip\":\"68.000.000.133\",\"deviceVersion\":[{\"component\":\"app\",\"build\":\"oncue#1.19.40.108253#mallard2_GA.0\",\"otherDetail\":null},{\"component\":\"service\",\"build\":\"qa-a.stb.fios.tv\",\"otherDetail\":null},{\"component\":\"location\",\"build\":\"1000.00,1000.00\",\"otherDetail\":null},{\"component\":\"Client\",\"build\":\"108253#release\",\"otherDetail\":null}],\"__lane\":\"prod\",\"__host\":\"unknown\",\"navigationStack\":[{\"name\":\"\",\"index\":0,\"type\":\"\"}],\"platformVersion\":\"108253#release\",\"assetType\":\"LinearAsset\",\"assetId\":\"2732f41bdecc33aca2a23146eabd0954-5e4c3aaa6ef7312b8104c94c842d6a3f-2017-03-24-1\",\"restrictedBy\":null,\"programStartTime\":1490385600000,\"attributionId\":\"ffffffff-ffff-ffff-ffff-fffffffffff\",\"assetSessionId\":\"1490386010685\",\"__sourceType\":\"device\",\"serviceTimestamp\":null,\"appVersion\":\"1.19.40.108253\",\"playType\":\"tuneOut\",\"collectionId\":\"\",\"deviceType\":\"501\",\"accountId\":\"1003469\",\"playRate\":0,\"maestro\":{\"vhoId\":\"\",\"host\":\"qa-a-aws.stb.fios.tv\",\"userAgent\":\"Mozilla/5.0 (STB; CPU 501 OS 108253) OnCue/1.19.40\",\"version\":\"4.4.3851\",\"inHome\":true,\"ipAddress\":\"68.000.000.133\"},\"encoderDelay\":49000,\"__eventId\":\"uXvQcxR/sMGKvAFbAe6R2w==\",\"__timestamp\":1490386063835,\"sessionId\":\"617F7743-1490378565\",\"__eventName\":\"1\",\"programEndTime\":1490387400000,\"programId\":\"5e4c3aaa6ef7312b8104c94c842d6a3f\",\"__source\":\"unknown\",\"liveTuneType\":\"live\",\"deviceTimestamp\":1490386063730,\"deviceId\":\"617F7743\",\"__eventVersion\":16,\"recordingId\":null,\"channelId\":\"2732f41bdecc33aca2a23146eabd0954\",\"timeZone\":\"America/New_York\",\"eventProgramPoint\":1490387400000}]}"
| rex mode=sed "s/.*?\[(.*)]\.*/\1/ s/,({\"earlyAccess)/!\1/"
| makemv delim="!" _raw
| stats count by _raw
| spath
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-trim = s/.*?\[(.*)]\.*/\1/
SHOULD_LINEMERGE = false
LINE_BREAKER = (,){\"earlyAccess
KV_MODE = JSON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;SEDCMD&lt;/CODE&gt; and &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; can be confirmed like this. &lt;/P&gt;

&lt;P&gt;You can do it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 22:09:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-line-breaking-issue/m-p/477289#M81938</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-17T22:09:22Z</dc:date>
    </item>
  </channel>
</rss>

