<?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: Why are my json fields extracted twice? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171602#M49187</link>
    <description>&lt;P&gt;Thanks a lot!&lt;BR /&gt;
I was getting crazy trying to understand why that was happening.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 15:18:14 GMT</pubDate>
    <dc:creator>PatG_</dc:creator>
    <dc:date>2016-09-23T15:18:14Z</dc:date>
    <item>
      <title>Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171599#M49184</link>
      <description>&lt;P&gt;I have json events like :    { A:"1",B:"2",C:"3"}&lt;BR /&gt;
with a sourcetype named json_app&lt;/P&gt;

&lt;P&gt;When I search the fields, I get 2 values , but not the source/sourcetype/index/_time&lt;BR /&gt;
A =" 1 , 1" like multivalues&lt;/P&gt;

&lt;P&gt;This started in splunk 6.1&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2014 22:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171599#M49184</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-22T22:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171600#M49185</link>
      <description>&lt;P&gt;Found the explanation, this is the new feature "INDEXED_EXTRACTIONS"&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/Data/Extractfieldsfromfileheadersatindextime"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/Data/Extractfieldsfromfileheadersatindextime&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This does the index time extraction of the fields, at parsing time, this means that the FORWARDERS are parsing the events if specified.&lt;BR /&gt;
Remark : It also means that for those special events,  &lt;EM&gt;the timestamp is now extracted by the forwarder&lt;/EM&gt;, and that the &lt;EM&gt;filtering is done by the forwarders&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;example props.conf on the forwarder&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_app]
INDEXED_EXTRACTIONS=json   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My problem is that I also have a search-time automatic extraction of the fields for json data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_app]
KV_MODE=json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So at the end I got 2 times the same fields.&lt;/P&gt;

&lt;P&gt;To fix the issue, I simply &lt;STRONG&gt;disabled the KV_MODE on the search-head&lt;/STRONG&gt;, and reloaded with the search command &lt;CODE&gt;| extract reload=true&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Here is my final props for my sourcetype.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_app]
INDEXED_EXTRACTIONS=json
KV_MODE=none
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Oct 2014 22:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171600#M49185</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-10-22T22:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171601#M49186</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Remark : It also means that for those special events, the timestamp is now extracted by the forwarder, and that the filtering is done by the forwarders&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;This sounds confusing - do you mean Light/Heavy forwarders or Universal Forwarders? The wiki (&lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F&lt;/A&gt;) does mention the same thing, that INDEXED_EXTRACTIONS is done in the input stage. This seems an unfortunate effect, have you seen any increased workload on the UF?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2014 11:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171601#M49186</guid>
      <dc:creator>laserval</dc:creator>
      <dc:date>2014-12-02T11:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171602#M49187</link>
      <description>&lt;P&gt;Thanks a lot!&lt;BR /&gt;
I was getting crazy trying to understand why that was happening.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 15:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171602#M49187</guid>
      <dc:creator>PatG_</dc:creator>
      <dc:date>2016-09-23T15:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171603#M49188</link>
      <description>&lt;P&gt;I have the same problem where I am getting duplicated field values from my json logs.  I have a universal forwarder that sends data to a heavy forwarder, which then sends that data to indexers.  I have the following props.conf in each layer where the INDEXED_EXTRACTIONS is set to 'json' at the universal forwarder and set to none at every other layer (heavy forwarder, indexer, and search head).  I don't understand why the fields are still getting extracted twice:&lt;/P&gt;

&lt;P&gt;universal forwarder props.conf:&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
SHOULD_LINEMERGE = true &lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TRUNCATE = 500000&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = CAP - Ramp Document Monitoring&lt;BR /&gt;
AUTO_KV_JSON = false&lt;/P&gt;

&lt;P&gt;Heavy forwarder props.conf:&lt;BR /&gt;
INDEXED_EXTRACTIONS = none&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TRUNCATE = 500000&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = CAP - Ramp Document Monitoring&lt;BR /&gt;
AUTO_KV_JSON = false&lt;/P&gt;

&lt;P&gt;Indexer props.conf:&lt;BR /&gt;
INDEXED_EXTRACTIONS = none&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TRUNCATE = 500000&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = CAP - Ramp Document Monitoring&lt;BR /&gt;
AUTO_KV_JSON = false&lt;/P&gt;

&lt;P&gt;Search Head props.conf:&lt;BR /&gt;
INDEXED_EXTRACTIONS = none &lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TRUNCATE = 500000&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = CAP - Ramp Document Monitoring&lt;BR /&gt;
AUTO_KV_JSON = false&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171603#M49188</guid>
      <dc:creator>vinit_masaun</dc:creator>
      <dc:date>2020-09-29T17:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my json fields extracted twice?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171604#M49189</link>
      <description>&lt;P&gt;Hi Vinit&lt;/P&gt;

&lt;P&gt;It would be better if you post this as a new question, since this post is 3 years old and you might not get as much visibility on your question.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-json-fields-extracted-twice/m-p/171604#M49189</guid>
      <dc:creator>Anam</dc:creator>
      <dc:date>2018-01-25T19:00:39Z</dc:date>
    </item>
  </channel>
</rss>

