<?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 - Duplicated Fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476820#M81864</link>
    <description>&lt;P&gt;Resolved also the "props path problem", adjusting the "metadata/local.meta" of the TA, setting global.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 17:50:26 GMT</pubDate>
    <dc:creator>verbal_666</dc:creator>
    <dc:date>2019-09-17T17:50:26Z</dc:date>
    <item>
      <title>JSON - Duplicated Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476816#M81860</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Splunk Enterprise 7.0.2&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Can't get rid of duplicated fields indexed in a json format. I tryied all combinations, in IDX Env and SH Env, both equals, then different, no way AT ALL.&lt;/P&gt;

&lt;P&gt;JSON, very simple:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[
  {
    "name": "Name1",
    "id": 1,
    "age": 20
  }, {
    "name": "Name2",
    "id": 8,
    "age": 30
  }, {
    "name": "Name3",
    "id": 12,
    "age": 40
  }
]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Props IDX and SH, equal,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[JSON]
INDEXED_EXTRACTIONS = json
SHOULD_LINEMERGE = true
NO_BINARY_CHECK = true
CHARSET=UTF-8
KV_MODE = json
AUTO_KV_JSON = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results,&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7659iA0FECDC69C490D50/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7660iF934C74731DCCC6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I can't "mvdedup" all fields, also because this is a simple test json, then i'll have to index complex with arrays and hundreds fields...&lt;/P&gt;

&lt;P&gt;Solutions? It's getting me mad!!!&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 16:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476816#M81860</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2019-09-13T16:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSON - Duplicated Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476817#M81861</link>
      <description>&lt;P&gt;Find a solution.&lt;BR /&gt;
I used the "preconfigured"&lt;/P&gt;

&lt;P&gt;"&lt;STRONG&gt;_json&lt;/STRONG&gt;" sourcetype in "&lt;EM&gt;/opt/splunk/etc/system/default/props.conf&lt;/EM&gt;"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[_json]
pulldown_type = true
INDEXED_EXTRACTIONS = json
KV_MODE = none
category = Structured
description = JavaScript Object Notation format. For more information, visit &lt;A href="http://json.org/" target="test_blank"&gt;http://json.org/&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... ingestion produced no duplicated fields...&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 11:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476817#M81861</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2019-09-15T11:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSON - Duplicated Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476818#M81862</link>
      <description>&lt;P&gt;The only problem is now with much complex json format, like {} formatted,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
"data": [
    {
        "displayName": "First Name",
        "rank": 1,
        "value": "VALUE"
    },
    {
        "displayName": "Last Name",
        "rank": 2,
        "value": "VALUE"
    },
    {
        "displayName": "Position",
        "rank": 3,
        "value": "VALUE"
    },
    {
        "displayName": "Company Name",
        "rank": 4,
        "value": "VALUE"
    },
    {
        "displayName": "Country",
        "rank": 5,
        "value": "VALUE"
    }
]
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not indexed with multiple events, but single events and multivalue fields...&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 11:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476818#M81862</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2019-09-15T11:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: JSON - Duplicated Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476819#M81863</link>
      <description>&lt;P&gt;Another strange behaviour.&lt;BR /&gt;
This is the perfect/right props.conf to index the json, also more complicated (1000 records with multiple arrays),&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_json]
pulldown_type = true
INDEXED_EXTRACTIONS = json
KV_MODE = none
category = Structured
TRUNCATE=0
JSON_TRIM_BRACES_IN_ARRAY_NAMES=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NOW, on my test-Environment (single istance idx,sh all),&lt;BR /&gt;
1) if i let props.conf stay in etc/apps/MY_TA/default/ , fields are duplicated, no truncate (seems the TA works as a simple Forwarder)&lt;BR /&gt;
2) if i move the props.conf in etc/system/local, json is perfectly indexed (now seems the props is used as Indexer)&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 20:37:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476819#M81863</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2019-09-16T20:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: JSON - Duplicated Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476820#M81864</link>
      <description>&lt;P&gt;Resolved also the "props path problem", adjusting the "metadata/local.meta" of the TA, setting global.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 17:50:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-Duplicated-Fields/m-p/476820#M81864</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2019-09-17T17:50:26Z</dc:date>
    </item>
  </channel>
</rss>

