<?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: Automatic extraction of JSON fields doesn't work and have to use spath in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379341#M68543</link>
    <description>&lt;P&gt;So there are 3 places the props.conf go to: the forwarder, the indexer, and the head. Could you advice more specifically which one I should change into what? Do I keep AUTO_KV_JSON at all 3 places?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:24:01 GMT</pubDate>
    <dc:creator>Motoko89</dc:creator>
    <dc:date>2020-09-29T19:24:01Z</dc:date>
    <item>
      <title>Automatic extraction of JSON fields doesn't work and have to use spath</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379338#M68540</link>
      <description>&lt;P&gt;I have a distributed Splunk deployment and need to index JSON data, 1 object per row. Objects are serialized using &lt;CODE&gt;NewtonSoft.JSON .NET&lt;/CODE&gt; library. I already configured both &lt;CODE&gt;INDEXED_EXTRACTIONS = json&lt;/CODE&gt; and &lt;CODE&gt;KV_MODE = json&lt;/CODE&gt; for my custom source type in &lt;CODE&gt;props.conf&lt;/CODE&gt; for deployment app of forwarders, indexers, and heads.&lt;/P&gt;

&lt;P&gt;Yet, when I search, I still need to specify &lt;CODE&gt;spath&lt;/CODE&gt; else no result is returned. Our event text length does not exceed 5000 chars (~ 2500 chars) so I don't think the problem  here &lt;A href="https://answers.splunk.com/answers/177410/why-are-only-some-json-fields-extracted-as-data-in.html"&gt;https://answers.splunk.com/answers/177410/why-are-only-some-json-fields-extracted-as-data-in.html&lt;/A&gt; affect us. What do I miss here? Any suggestion?&lt;/P&gt;

&lt;P&gt;My &lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myblob]
DATETIME_CONFIG = 
INDEXED_EXTRACTIONS = json
KV_MODE = json
AUTO_KV_JSON = true
NO_BINARY_CHECK = true
category = Structured
description = my blob description
disabled = false
TIME_PREFIX=\"EventInfo\.Time\":\s*
TIME_FORMAT=%Y-%m-%dT%H:%M:%S.%7NZ
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 May 2018 01:04:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379338#M68540</guid>
      <dc:creator>Motoko89</dc:creator>
      <dc:date>2018-05-02T01:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic extraction of JSON fields doesn't work and have to use spath</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379339#M68541</link>
      <description>&lt;P&gt;You cant specify both INDEXED_EXTRACTIONS and KV_MODE in the props .&lt;BR /&gt;
You need to specify either of one .&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;[myblob]&lt;BR /&gt;
 DATETIME_CONFIG = &lt;BR /&gt;
 KV_MODE = json&lt;BR /&gt;
 AUTO_KV_JSON = true&lt;BR /&gt;
 NO_BINARY_CHECK = true&lt;BR /&gt;
 category = Structured&lt;BR /&gt;
 description = my blob description&lt;BR /&gt;
 disabled = false&lt;BR /&gt;
 TIME_PREFIX=\"EventInfo.Time\":\s*&lt;BR /&gt;
 TIME_FORMAT=%Y-%m-%dT%H:%M:%S.%7NZ&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379339#M68541</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2020-09-29T19:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic extraction of JSON fields doesn't work and have to use spath</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379340#M68542</link>
      <description>&lt;P&gt;...and you most likely want to use KV_MODE and not indexed extractions. Remember that in case 9d KV_MODE, this has to go on the search head, not on the indexer. In case of indexed extractions, it has to go on the indexer, and maybe on the search head (not sure about that). &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:19:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379340#M68542</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2020-09-29T19:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic extraction of JSON fields doesn't work and have to use spath</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379341#M68543</link>
      <description>&lt;P&gt;So there are 3 places the props.conf go to: the forwarder, the indexer, and the head. Could you advice more specifically which one I should change into what? Do I keep AUTO_KV_JSON at all 3 places?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379341#M68543</guid>
      <dc:creator>Motoko89</dc:creator>
      <dc:date>2020-09-29T19:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic extraction of JSON fields doesn't work and have to use spath</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379342#M68544</link>
      <description>&lt;P&gt;&lt;CODE&gt;AUTO_KV_JSON&lt;/CODE&gt; is not needed anywhere, because it defaults to &lt;CODE&gt;true&lt;/CODE&gt; anyway &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AUTO_KV_JSON = [true|false]
* Used for search-time field extractions only.
* Specifies whether to try json extraction automatically.
* Defaults to true.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you use &lt;CODE&gt;KV_MODE=json&lt;/CODE&gt; it will only go on the search head. And adding to this, your JSON format must be true and valid JSON otherwise Splunk will not do anything ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* The 'xml' and 'json' modes will not extract any fields when used on data
  that isn't of the correct format (JSON or XML).
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 20:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-extraction-of-JSON-fields-doesn-t-work-and-have-to-use/m-p/379342#M68544</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-05-02T20:25:47Z</dc:date>
    </item>
  </channel>
</rss>

