<?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 am I getting duplicate values for all fields from JSON events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254331#M76160</link>
    <description>&lt;P&gt;There are two different props.conf you have to create. &lt;/P&gt;

&lt;P&gt;This line belongs to the universalforwarder&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
INDEXED_EXTRACTIONS = JSON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The other lines belong to the searchhead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
 KV_MODE = none
 AUTO_KV_JSON = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You probably want to create another props.conf on your indexer (or where you do the parsing). On this splunk instance you should extract the timestamp by yourself. It helps to speed up the parsing so that Splunk doesnt have to find the timestamp by itself. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
TIMESTAMP_FIELDS = date
TIME_FORMAT = %Y%m%d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Feb 2019 20:35:56 GMT</pubDate>
    <dc:creator>markusspitzli</dc:creator>
    <dc:date>2019-02-18T20:35:56Z</dc:date>
    <item>
      <title>Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254322#M76151</link>
      <description>&lt;P&gt;I have some JSON that I am indexing, using 6.3.0.1. If I index it as &lt;CODE&gt;sourcetype=_json&lt;/CODE&gt;, all is well.&lt;/P&gt;

&lt;P&gt;I defined a new source type, using the information from &lt;A href="https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html"&gt;https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html&lt;/A&gt;, specifically &lt;CODE&gt;AUTO_KV_JSON = false&lt;/CODE&gt; and &lt;CODE&gt;KV_MODE = none&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I'm getting duplicate values for all the fields in the JSON when I index it using this sourcetype and search it. &lt;STRONG&gt;What did I miss?&lt;/STRONG&gt; I've had and solved this before, but I sure can't figure out what I missed here....&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///home/splunk/cloudlock/*]
disabled = 0
sourcetype = cloudlock:incident_aggregate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cloudlock:incident_aggregate]
pulldown_type = true
INDEXED_EXTRACTIONS = json
KV_MODE = none
AUTO_KV_JSON = false
category = Structured
description = Cloudlock incident aggregate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I confirmed that the settings are as expected with &lt;CODE&gt;splunk btool props list--debug&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    [cloudlock:incident_aggregate]
/opt/splunk/etc/system/default/props.conf                         ANNOTATE_PUNCT = True
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    AUTO_KV_JSON = false
/opt/splunk/etc/system/default/props.conf                         BREAK_ONLY_BEFORE = 
/opt/splunk/etc/system/default/props.conf                         BREAK_ONLY_BEFORE_DATE = True
/opt/splunk/etc/system/default/props.conf                         CHARSET = UTF-8
/opt/splunk/etc/system/default/props.conf                         DATETIME_CONFIG = /etc/datetime.xml
/opt/splunk/etc/system/default/props.conf                         HEADER_MODE = 
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    INDEXED_EXTRACTIONS = json
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    KV_MODE = none
/opt/splunk/etc/system/default/props.conf                         LEARN_SOURCETYPE = true
/opt/splunk/etc/system/default/props.conf                         LINE_BREAKER_LOOKBEHIND = 100
/opt/splunk/etc/system/default/props.conf                         MAX_DAYS_AGO = 2000
/opt/splunk/etc/system/default/props.conf                         MAX_DAYS_HENCE = 2
/opt/splunk/etc/system/default/props.conf                         MAX_DIFF_SECS_AGO = 3600
/opt/splunk/etc/system/default/props.conf                         MAX_DIFF_SECS_HENCE = 604800
/opt/splunk/etc/system/default/props.conf                         MAX_EVENTS = 256
/opt/splunk/etc/system/default/props.conf                         MAX_TIMESTAMP_LOOKAHEAD = 128
/opt/splunk/etc/system/default/props.conf                         MUST_BREAK_AFTER = 
/opt/splunk/etc/system/default/props.conf                         MUST_NOT_BREAK_AFTER = 
/opt/splunk/etc/system/default/props.conf                         MUST_NOT_BREAK_BEFORE = 
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION = indexing
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION-all = full
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION-inner = inner
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION-outer = outer
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION-raw = none
/opt/splunk/etc/system/default/props.conf                         SEGMENTATION-standard = standard
/opt/splunk/etc/system/default/props.conf                         SHOULD_LINEMERGE = True
/opt/splunk/etc/system/default/props.conf                         TRANSFORMS = 
/opt/splunk/etc/system/default/props.conf                         TRUNCATE = 10000
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    category = Structured
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    description = Cloudlock incident aggregate
/opt/splunk/etc/system/default/props.conf                         detect_trailing_nulls = false
/opt/splunk/etc/system/default/props.conf                         maxDist = 100
/opt/splunk/etc/system/default/props.conf                         priority = 
/opt/splunk/etc/apps/all_whirlpool_transforms/local/props.conf    pulldown_type = true
/opt/splunk/etc/system/default/props.conf                         sourcetype = 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2016 23:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254322#M76151</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2016-05-18T23:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254323#M76152</link>
      <description>&lt;P&gt;Because you are using &lt;EM&gt;both&lt;/EM&gt; &lt;CODE&gt;INDEXED_EXTRACTIONS&lt;/CODE&gt; and &lt;CODE&gt;KV_MODE=JSON&lt;/CODE&gt;.  You should only be using one, probably the former.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 01:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254323#M76152</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-19T01:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254324#M76153</link>
      <description>&lt;P&gt;Please see this &lt;A href="https://answers.splunk.com/answers/227596/why-am-i-seeing-a-mismatch-between-key-value-and-c.html"&gt;https://answers.splunk.com/answers/227596/why-am-i-seeing-a-mismatch-between-key-value-and-c.html&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 03:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254324#M76153</guid>
      <dc:creator>satishsdange</dc:creator>
      <dc:date>2016-05-19T03:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254325#M76154</link>
      <description>&lt;P&gt;I'm not seeing where I have KV_MODE = JSON. I'm seeing KV_MODE = none.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:43:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254325#M76154</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2020-09-29T09:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254326#M76155</link>
      <description>&lt;P&gt;That answer recommends KV_MODE = none, which is already done.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 13:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254326#M76155</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2016-05-19T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254327#M76156</link>
      <description>&lt;P&gt;Settings are/were correct; what I missed was setting the correct permissions on the app containing them.&lt;/P&gt;

&lt;P&gt;The app wasn't set for global access. Had to add this to local.meta:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[]
access = read : [ * ], write : [ admin, power ]
export = system
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2016 12:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254327#M76156</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2016-05-20T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254328#M76157</link>
      <description>&lt;P&gt;Please elaborate; I do not see how this could cause what you were experiencing.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 18:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254328#M76157</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-20T18:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254329#M76158</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I went through the same issue. As far as I understood, if you really need indexed extraction, make sure to have your props.conf configured like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
...
INDEXED_EXTRACTIONS = JSON
KV_MODE = none
AUTO_KV_JSON = false
..
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;parameters explanation (from &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/Propsconf" target="_blank"&gt;props.conf&lt;/A&gt; specs):&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;KV_MODE = none&lt;/EM&gt;&lt;/STRONG&gt;: Used for search-time field extractions only. Specifies the field/value extraction @ search time mode for the data.
&lt;EM&gt;none&lt;/EM&gt;: if you want no field/value extraction to take place.
&lt;EM&gt;Defaults to auto&lt;/EM&gt;: extracts field/value pairs separated by equal signs.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;AUTO_KV_JSON = false&lt;/EM&gt;&lt;/STRONG&gt;: Used for search-time field extractions only. Specifies whether to try json extraction automatically.
&lt;EM&gt;Defaults to true.&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;To have a successful field extraction you should change both KV_MODE and AUTO_KV_JSON as explained above. Chanign just one of the 2 will lead to a field extraction misconfiguration, aka events look like doubled.&lt;/P&gt;

&lt;P&gt;Hope this will help, at least for me the above configuration make it sorted..&lt;/P&gt;

&lt;P&gt;Additional ref: &lt;A href="https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html" target="_blank"&gt;https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:16:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254329#M76158</guid>
      <dc:creator>Nicolo_Figiani</dc:creator>
      <dc:date>2020-09-29T10:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254330#M76159</link>
      <description>&lt;P&gt;I just ran into the same issue.  The "app" being referenced is the one deploying to the search heads.  So, if the props.conf going to the search heads has app/TA only permissions (we name ours 'XXX_TA_logtype'), which doesn't extend to the Search app, they won't work.&lt;/P&gt;

&lt;P&gt;INDEXED_EXTRACTIONS = JSON ----&amp;gt; Universal Forwarder&lt;/P&gt;

&lt;P&gt;KV_MODE = NONE&lt;BR /&gt;
AUTO_KV_JSON = FALSE  -----&amp;gt; Search Head with permissions set correctly&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:17:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254330#M76159</guid>
      <dc:creator>jtm7x2</dc:creator>
      <dc:date>2020-09-29T23:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254331#M76160</link>
      <description>&lt;P&gt;There are two different props.conf you have to create. &lt;/P&gt;

&lt;P&gt;This line belongs to the universalforwarder&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
INDEXED_EXTRACTIONS = JSON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The other lines belong to the searchhead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
 KV_MODE = none
 AUTO_KV_JSON = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You probably want to create another props.conf on your indexer (or where you do the parsing). On this splunk instance you should extract the timestamp by yourself. It helps to speed up the parsing so that Splunk doesnt have to find the timestamp by itself. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
TIMESTAMP_FIELDS = date
TIME_FORMAT = %Y%m%d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 20:35:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254331#M76160</guid>
      <dc:creator>markusspitzli</dc:creator>
      <dc:date>2019-02-18T20:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254332#M76161</link>
      <description>&lt;P&gt;Ah, so you &lt;EM&gt;were&lt;/EM&gt; using both settings, but you didn't think that you were.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 05:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254332#M76161</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-19T05:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254333#M76162</link>
      <description>&lt;P&gt;Brilliant worked perfectly!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 13:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254333#M76162</guid>
      <dc:creator>freedomson</dc:creator>
      <dc:date>2019-03-01T13:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting duplicate values for all fields from JSON events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254334#M76163</link>
      <description>&lt;P&gt;well explained.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 06:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-duplicate-values-for-all-fields-from-JSON/m-p/254334#M76163</guid>
      <dc:creator>ssharma09</dc:creator>
      <dc:date>2020-04-30T06:56:45Z</dc:date>
    </item>
  </channel>
</rss>

