<?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 several JSON fields getting extracted more than once at search-time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189149#M54495</link>
    <description>&lt;P&gt;Thank for your help&lt;BR /&gt;
I think this topic i now found covers it better &lt;A href="http://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html"&gt;http://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html&lt;/A&gt;&lt;BR /&gt;
The issue I created by&lt;BR /&gt;
using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
KV_MODE = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Changing to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
KV_MODE = none
AUTO_KV_JSON = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Fixed it, but now I wonder if where I currently index all the json fields (which might cause quite some indexing) instead of only _time, source, host, sourcetype&lt;/P&gt;</description>
    <pubDate>Thu, 20 Aug 2015 15:33:37 GMT</pubDate>
    <dc:creator>mathiask</dc:creator>
    <dc:date>2015-08-20T15:33:37Z</dc:date>
    <item>
      <title>Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189145#M54491</link>
      <description>&lt;P&gt;At search-time, several fields get extracted more than once, even if they only exist once in the event.&lt;BR /&gt;
I know I can dedup the search, but this is fighting the symptom not solving the problem&lt;BR /&gt;
The Question is, what config do I have to change to get this fixed?&lt;/P&gt;

&lt;P&gt;Issue:&lt;BR /&gt;
The fields "url" and "timestamp" show up twice with the same value in the search&lt;BR /&gt;
timestamp = 2015-08-20T12:03:33Z timestamp = 2015-08-20T12:03:33Z&lt;BR /&gt;
url = &lt;A href="http://www.switch.ch/" target="_blank"&gt;http://www.switch.ch/&lt;/A&gt; url = &lt;A href="http://www.switch.ch/" target="_blank"&gt;http://www.switch.ch/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Partial Example Event, in the log it is in one line&lt;BR /&gt;
{ &lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
    timestamp:  2015-08-20T12:03:33Z &lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
    url:  &lt;A href="http://www.switch.ch/" target="_blank"&gt;http://www.switch.ch/&lt;/A&gt; &lt;BR /&gt;
&amp;lt;other stuff&amp;gt;&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = json&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = -1&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TIMESTAMP_FIELDS = timestamp&lt;BR /&gt;
category = Structured&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189145#M54491</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2020-09-29T07:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189146#M54492</link>
      <description>&lt;P&gt;I think its extracting ok, but Splunk has already done the timestamp extraction automatically on top of what you specified, hence duplicating. Could you please try..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# props.conf   
[sourcetype]
NO_BINARY_CHECK = 1
TIME_PREFIX = "timestamp"
pulldown_type = 1
KV_MODE = JSON
# Sometimes below is required.
# BREAK_ONLY_BEFORE = (^{)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 14:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189146#M54492</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2015-08-20T14:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189147#M54493</link>
      <description>&lt;P&gt;Okay I will try that ..&lt;BR /&gt;
I also found the Time_PREFIX option&lt;BR /&gt;
But I did not use it because it does not explain why the url gets extracted twice&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189147#M54493</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2015-08-20T15:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189148#M54494</link>
      <description>&lt;P&gt;I guess the problem could be with the field extraction you're doing. Based on your sourcetype definition, you're using both INDEXED_EXTRACTION (index time field extraction) and KV_MODE (search time field extraction). With this you get every field extracted twice. I would recommend to use search time field extraction, so try this for your sourcetype definition:-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
KV_MODE = json
MAX_TIMESTAMP_LOOKAHEAD = -1
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIMESTAMP_FIELDS = timestamp
category = Structured
pulldown_type = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:05:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189148#M54494</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T07:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189149#M54495</link>
      <description>&lt;P&gt;Thank for your help&lt;BR /&gt;
I think this topic i now found covers it better &lt;A href="http://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html"&gt;http://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html&lt;/A&gt;&lt;BR /&gt;
The issue I created by&lt;BR /&gt;
using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
KV_MODE = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Changing to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
KV_MODE = none
AUTO_KV_JSON = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Fixed it, but now I wonder if where I currently index all the json fields (which might cause quite some indexing) instead of only _time, source, host, sourcetype&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189149#M54495</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2015-08-20T15:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189150#M54496</link>
      <description>&lt;P&gt;Okay I think now I managed to fix it&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
KV_MODE = none
AUTO_KV_JSON = false
TIME_PREFIX = "timestamp"
MAX_TIMESTAMP_LOOKAHEAD = 50
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIMESTAMP_FIELDS = timestamp
category = Structured
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This seems to export and index the JSON fields at Index Time therefore no later processing needed&lt;BR /&gt;
With the TIME_PREFIX I think i can reduce the lookahead&lt;/P&gt;

&lt;P&gt;Thanks all&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189150#M54496</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2015-08-20T15:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why are several JSON fields getting extracted more than once at search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189151#M54497</link>
      <description>&lt;P&gt;Could you please check the question having the same issue &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/626871/double-field-extraction-for-the-json-data.html?minQuestionBodyLength=80"&gt;https://answers.splunk.com/answers/626871/double-field-extraction-for-the-json-data.html?minQuestionBodyLength=80&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 23:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-several-JSON-fields-getting-extracted-more-than-once-at/m-p/189151#M54497</guid>
      <dc:creator>nawazns5038</dc:creator>
      <dc:date>2018-03-15T23:17:15Z</dc:date>
    </item>
  </channel>
</rss>

