<?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 file event breaking parsing on universal forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491259#M83940</link>
    <description>&lt;P&gt;What if you remove the &lt;CODE&gt;INDEXED_EXTRACTIONS = json&lt;/CODE&gt; from the UF's config (and enable kvmode again, or move the indexed extractions to the indexer)? The UF will try to do the json extractions, without any of the custom line breaking and header stripping. And once the indexed extractions have been done, the downstream splunk enterprise instance will no longer apply linebreaking stuff if I'm not mistaken.&lt;/P&gt;

&lt;P&gt;Indexing JSON files that contain multiple events in one json structure is anyway a pain in the proverbial butt. You might also want to look at setting sensible EVENT_BREAKER settings on your UF, to at least make sure events arrive in one piece at the indexers.&lt;/P&gt;

&lt;P&gt;Or consider using a heavy forwarder for this, so that indexed extractions and linebreaking and such happen at the same place.&lt;/P&gt;

&lt;P&gt;But all in all, I think changing how this data gets logged, or do some pre-processing on the json file to transform it into individual events, might be the best (but not necessarily the easiest) thing to do here.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2020 08:23:26 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2020-03-13T08:23:26Z</dc:date>
    <item>
      <title>JSON file event breaking parsing on universal forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491258#M83939</link>
      <description>&lt;P&gt;I have a JSON file. &lt;BR /&gt;
Once I upload the file on the search head using the below stanza in props.conf it's indexed properly.  &lt;/P&gt;

&lt;P&gt;Splunk 7.3.4&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_test]
CHARSET = UTF-8
DATETIME_CONFIG = CURRENT
SEDCMD-cut_footer = s/\]\,\n\s*\"total\":.*$/g
SEDCMD-cut_header = s/^\{\n\s*\"matches\":\s\[/g
category = Structured
disabled = false
HEADER_FIELD_LINE_NUMBER = 3
SHOULD_LINEMERGE = 0
TRUNCATE = 0
INDEXED_EXTRACTIONS = json
KV_MODE = none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once I upload the data from UF the data do not break to events &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Universal Forwarder&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_test]
CHARSET = UTF-8
INDEXED_EXTRACTIONS = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///tmp/*.json]
disabled = 0
sourcetype = json_test
index = test_hr
crcSalt  = REINDEXMEPLEASE
initCrcLength = 780
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Indexer&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_test]
DATETIME_CONFIG = CURRENT
SEDCMD-cut_footer = s/\]\,\n\s*\"total\":.*$/g
SEDCMD-cut_header = s/^\{\n\s*\"matches\":\s\[/g
category = Structured
disabled = false
HEADER_FIELD_LINE_NUMBER = 3
SHOULD_LINEMERGE = 0
TRUNCATE = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search Head&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_test]
KV_MODE = none
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 13:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491258#M83939</guid>
      <dc:creator>rayar</dc:creator>
      <dc:date>2020-03-12T13:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: JSON file event breaking parsing on universal forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491259#M83940</link>
      <description>&lt;P&gt;What if you remove the &lt;CODE&gt;INDEXED_EXTRACTIONS = json&lt;/CODE&gt; from the UF's config (and enable kvmode again, or move the indexed extractions to the indexer)? The UF will try to do the json extractions, without any of the custom line breaking and header stripping. And once the indexed extractions have been done, the downstream splunk enterprise instance will no longer apply linebreaking stuff if I'm not mistaken.&lt;/P&gt;

&lt;P&gt;Indexing JSON files that contain multiple events in one json structure is anyway a pain in the proverbial butt. You might also want to look at setting sensible EVENT_BREAKER settings on your UF, to at least make sure events arrive in one piece at the indexers.&lt;/P&gt;

&lt;P&gt;Or consider using a heavy forwarder for this, so that indexed extractions and linebreaking and such happen at the same place.&lt;/P&gt;

&lt;P&gt;But all in all, I think changing how this data gets logged, or do some pre-processing on the json file to transform it into individual events, might be the best (but not necessarily the easiest) thing to do here.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 08:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491259#M83940</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2020-03-13T08:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSON file event breaking parsing on universal forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491260#M83941</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
thanks for your inputs&lt;BR /&gt;&lt;BR /&gt;
updated as below&lt;/P&gt;

&lt;P&gt;UF&lt;/P&gt;

&lt;P&gt;CHARSET = UTF-8&lt;BR /&gt;
KV_MODE = none&lt;/P&gt;

&lt;P&gt;Indexer &lt;/P&gt;

&lt;P&gt;[json_odelia]&lt;BR /&gt;
DATETIME_CONFIG = CURRENT&lt;BR /&gt;
SEDCMD-cut_footer = s/]\,\n\s*\"total\":.&lt;EM&gt;$/g&lt;BR /&gt;
SEDCMD-cut_header = s/^{\n\s&lt;/EM&gt;\"matches\":\s[/g&lt;BR /&gt;
category = Structured&lt;BR /&gt;
disabled = false&lt;BR /&gt;
HEADER_FIELD_LINE_NUMBER = 3&lt;BR /&gt;
SHOULD_LINEMERGE = 0&lt;BR /&gt;
TRUNCATE = 0&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;/P&gt;

&lt;P&gt;still not working &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-file-event-breaking-parsing-on-universal-forwarder/m-p/491260#M83941</guid>
      <dc:creator>rayar</dc:creator>
      <dc:date>2020-09-30T04:38:27Z</dc:date>
    </item>
  </channel>
</rss>

