<?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: Parsing very long JSON lines in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189342#M37718</link>
    <description>&lt;P&gt;Is each event one line?&lt;/P&gt;

&lt;P&gt;Does adding a line break - but keeping it one event - in the middle of a long line change the parsing behaviour?&lt;/P&gt;

&lt;P&gt;How many fields are there in not fully parsed events?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Oct 2014 18:31:49 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-10-30T18:31:49Z</dc:date>
    <item>
      <title>Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189341#M37717</link>
      <description>&lt;P&gt;I am working with log lines of pure JSON (so no need to rex the lines - Splunk is correctly parsing and extracting all the JSON fields).  However, some of these lines are extremely long (greater than 5000 characters).  &lt;/P&gt;

&lt;P&gt;In order for Splunk to parse these long lines I have set TRUNCATE=0 in props.conf and this is working.&lt;BR /&gt;
However, when I search, Splunk is not parsing the JSON fields at the end of the longer lines, meaning that if I search on these particular fields, the long lines don't appear in the search results.&lt;/P&gt;

&lt;P&gt;Fields at the start of long lines do get parsed correctly.&lt;BR /&gt;
Lines less than 5000 characters with the same fields do get parsed and searched correctly, so it's not a problem with the JSON field itself.&lt;/P&gt;

&lt;P&gt;Is there some config setting or some command in my search that I can add to parse these lines, regardless of length?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2014 15:44:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189341#M37717</guid>
      <dc:creator>leatherface</dc:creator>
      <dc:date>2014-10-30T15:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189342#M37718</link>
      <description>&lt;P&gt;Is each event one line?&lt;/P&gt;

&lt;P&gt;Does adding a line break - but keeping it one event - in the middle of a long line change the parsing behaviour?&lt;/P&gt;

&lt;P&gt;How many fields are there in not fully parsed events?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2014 18:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189342#M37718</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-30T18:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189343#M37719</link>
      <description>&lt;P&gt;Each event is on one line.&lt;BR /&gt;&lt;BR /&gt;
Short lines have just under 100 fields versus vs around 150  fields for long lines.  Long lines also have much longer field names (130 characters vs 60).  If the limit on parsing fields is 100, this would fit with what I'm seeing.&lt;BR /&gt;
I will test the line break and see what happens.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 13:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189343#M37719</guid>
      <dc:creator>leatherface</dc:creator>
      <dc:date>2014-10-31T13:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189344#M37720</link>
      <description>&lt;P&gt;So I did a little testing: &lt;BR /&gt;
Adding a line break to the event makes no difference.&lt;BR /&gt;&lt;BR /&gt;
However, if I move the event I am trying to search to the start of a long line it will get parsed and I can search it.&lt;BR /&gt;
By creating a log line with only two fields but one of them having a 15,000 character name, I find that the short field at the end of the line is not parsed.&lt;BR /&gt;
Therefore it would seem the issue is definitely caused by the length of the line, but the total number of fields in the line may also be a factor.&lt;BR /&gt;
Any suggestions that don't involve me changing the logging itself?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 13:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189344#M37720</guid>
      <dc:creator>leatherface</dc:creator>
      <dc:date>2014-10-31T13:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189345#M37721</link>
      <description>&lt;P&gt;I remember there was an issue surrounding a maximum of 100 auto-extracted fields some time ago, that's why I asked. That wasn't JSON though... I don't really have a solution for you, just asking questions that might point someone in the right direction.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 14:45:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189345#M37721</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-31T14:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189346#M37722</link>
      <description>&lt;P&gt;I had been hitting the same problem: some events had xml that was longer than 5000 characters, and spath wasn't extracting all the fields I knew were in there.&lt;/P&gt;&lt;P&gt;Here's how to fix it:&lt;BR /&gt;Override the spath character limit in $splunk_home%/etc/system/local/limits.conf.&lt;/P&gt;&lt;P&gt;My exact edit was to add the below config section to /opt/splunk/etc/system/local/limits.conf (since it wasn't there be default in 4.3.3). I pulled this from /opt/splunk/etc/system/default/limit.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[spath]
#number of characters to read from an XML or JSON event when auto extracting
extraction_cutoff = 10000&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Feb 2021 20:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189346#M37722</guid>
      <dc:creator>capnjosh</dc:creator>
      <dc:date>2021-02-03T20:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing very long JSON lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189347#M37723</link>
      <description>&lt;P&gt;What splunk server would this configuration be updated on?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 23:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-very-long-JSON-lines/m-p/189347#M37723</guid>
      <dc:creator>hexxamillion</dc:creator>
      <dc:date>2019-01-24T23:13:28Z</dc:date>
    </item>
  </channel>
</rss>

