<?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: KV_MODE=json sometimes skips a particular JSON field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468218#M131816</link>
    <description>&lt;P&gt;Turns out the issue was caused by an autolookup with an outdated CSV lookup file where userEmail was one of the autolookup fields. Updated the CSV fixed my issue.&lt;/P&gt;

&lt;P&gt;In this case, it appears that all userEmails that did exist in the lookup table would autolookup and extract correctly, and userEmails that were not present in the CSV would fail autolookup and for some reason also broke field extraction.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2019 06:07:38 GMT</pubDate>
    <dc:creator>zanglang</dc:creator>
    <dc:date>2019-09-05T06:07:38Z</dc:date>
    <item>
      <title>KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468214#M131812</link>
      <description>&lt;P&gt;We have a log file with multiple lines of JSON similar to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ "foo": "bar","foo1":"foo2","userEmail":"foo@bar.com"}
{ "foo": "bar","foo1":"foo2","userEmail":"foo1@bar.com"}
{ "foo": "bar","foo1":"foo2","userEmail":"foo2@bar.com"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And search-time extraction works fine for almost all of the fields... except one! Oddly, around 7-8% of all logs do not have userEmail automatically extracted as checked in the Event Coverage, even when I've manually defined it in props.conf. This was verified with the queries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo | search userEmail=*
index=foo | search NOT userEmail=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Events are sent from a forwarder with this props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[foo]
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %Y%m%d%H%M%S%3N
TIME_PREFIX = \"timestamp\":\"
TZ = UTC
KV_MODE = json
disabled = false
TRUNCATE = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I added these on the search head earlier today to force search-time extraction for userEmail, but didn't work, even when I verified the regex catches all emails in Splunk Web:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[foo]
EXTRACT-userEmail = "userEmail":"(?P&amp;lt;userEmail&amp;gt;[^"]+)
KV_MODE = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea why this might happen?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 10:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468214#M131812</guid>
      <dc:creator>zanglang</dc:creator>
      <dc:date>2019-08-28T10:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468215#M131813</link>
      <description>&lt;P&gt;Have you tried  btool - if you're running on Linux I would try something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk btool props list --debug | grep "userEmail"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Field aliasing, calculated fields, and lookups are all performed at search time after KV extractions, maybe there's an errant config that's overwriting your field.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 20:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468215#M131813</guid>
      <dc:creator>wenthold</dc:creator>
      <dc:date>2019-08-28T20:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468216#M131814</link>
      <description>&lt;P&gt;Open a support case.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 20:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468216#M131814</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-09-01T20:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468217#M131815</link>
      <description>&lt;P&gt;I'm experiencing the same thing.  &lt;/P&gt;

&lt;P&gt;I have JSON formatted data from the NetApp ONTAP add-on that contains a pool_id field.  If I search the correct index and sourcetype and add " |extract" or "| spath", pool_id gets extracted correctly otherwise it extracts what appears to be all other fields except for this one.  Scratching head...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468217#M131815</guid>
      <dc:creator>jhollfelder_spl</dc:creator>
      <dc:date>2020-09-30T01:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468218#M131816</link>
      <description>&lt;P&gt;Turns out the issue was caused by an autolookup with an outdated CSV lookup file where userEmail was one of the autolookup fields. Updated the CSV fixed my issue.&lt;/P&gt;

&lt;P&gt;In this case, it appears that all userEmails that did exist in the lookup table would autolookup and extract correctly, and userEmails that were not present in the CSV would fail autolookup and for some reason also broke field extraction.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 06:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468218#M131816</guid>
      <dc:creator>zanglang</dc:creator>
      <dc:date>2019-09-05T06:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468219#M131817</link>
      <description>&lt;P&gt;@zanglang If your problem is resolved, please accept an answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468219#M131817</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-09-05T12:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: KV_MODE=json sometimes skips a particular JSON field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468220#M131818</link>
      <description>&lt;P&gt;So it turns out that my problem was caused by a FIELDALIAS setting that was setting a field that actually existed in the data with a field that didn't exist.  If I had run btool as suggested by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/183923"&gt;@wenthold&lt;/a&gt;, I would have found this much faster.&lt;/P&gt;

&lt;P&gt;It turns out that if the props.conf add-on had used "ASNEW" instead of "AS" in the FIELDALIAS definition, Splunk would have kept the field extraction it found in the data rather than overwrite it with a field that didn't exist.  The update I made to local/props.conf for that add-on was:&lt;BR /&gt;
  FIELDALIAS-array_id = uuid ASNEW array_id&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/KV-MODE-json-sometimes-skips-a-particular-JSON-field/m-p/468220#M131818</guid>
      <dc:creator>jhollfelder_spl</dc:creator>
      <dc:date>2020-09-30T02:04:42Z</dc:date>
    </item>
  </channel>
</rss>

