<?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: Exracting a json field data from a log in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342150#M94861</link>
    <description>&lt;P&gt;Did you try putting &lt;CODE&gt;KV_MODE=_json OR INDEXED_EXTRACTION = _json&lt;/CODE&gt;?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 10:49:30 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-04-19T10:49:30Z</dc:date>
    <item>
      <title>Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342149#M94860</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am trying to extact a JSON field from the log. I can able to get the data by using "spath input" command. Can you help me with this command's configuration in the back end file so that it can automatically do the job.&lt;/P&gt;

&lt;P&gt;search query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*|spath input=&amp;lt;JSON field name&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to update this search in props.conf / transforms.conf.&lt;/P&gt;

&lt;P&gt;Please find more details about it from the sample log below as I can see it's bit confusing.&lt;/P&gt;

&lt;P&gt;"Master_field": "value", "Master_field": "{\"field1\":\"***\",\"field2\":\"value2\",\"field3\":\"value3\",\"field4\":\"value4\",\"field5\":\"{value5}\",\"field6\":\"value6\"},"Master_field": "value"}&lt;/P&gt;

&lt;P&gt;Here is the raw data I'm getting in the events. Master fields have been parsed successfully. But the sub fields are not able to parse  and they are coming under respective master field. &lt;/P&gt;

&lt;P&gt;Using spath command in the query I am able to get the exact data but how to implement the same in the back end file to avoid using this command at search time.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sam&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:04:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342149#M94860</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2020-09-29T19:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342150#M94861</link>
      <description>&lt;P&gt;Did you try putting &lt;CODE&gt;KV_MODE=_json OR INDEXED_EXTRACTION = _json&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 10:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342150#M94861</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-19T10:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342151#M94862</link>
      <description>&lt;P&gt;Yes, already tried KV_MODE=JSON but no luck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 10:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342151#M94862</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-04-19T10:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342152#M94863</link>
      <description>&lt;P&gt;You can try the following in props.conf&lt;/P&gt;

&lt;P&gt;[sourcteype]&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342152#M94863</guid>
      <dc:creator>ravidudala</dc:creator>
      <dc:date>2020-09-29T19:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342153#M94864</link>
      <description>&lt;P&gt;I think if you have the data in splunk as sourcetype _json or json_no_timestamp you should be ok, see how this turns up in a verbose mode search and there may not be a need to use INDEXED_EXTRACTIONS=json or KV_MODE = none or spath queries.&lt;/P&gt;

&lt;P&gt;There are issues when you have data that "contains" JSON, e.g. an exception message etc...  That's when problems begin, is this the case.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342153#M94864</guid>
      <dc:creator>jlvix1</dc:creator>
      <dc:date>2020-09-29T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342154#M94865</link>
      <description>&lt;P&gt;I tried it but still getting the same result.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342154#M94865</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-04-19T13:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342155#M94866</link>
      <description>&lt;P&gt;We had the following thread about this subject at - &lt;A href="https://answers.splunk.com/answers/615506/what-are-the-requirements-for-a-perfect-splunk-jso.html"&gt;What are the requirements for a perfect Splunk JSON document?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The following worked for us -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INDEXED_EXTRACTIONS = json
category = Structured
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:20:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342155#M94866</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-04-19T13:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exracting a json field data from a log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342156#M94867</link>
      <description>&lt;P&gt;Yes, you are absolutely right we can use this to parse and index the JSON data.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Exracting-a-json-field-data-from-a-log/m-p/342156#M94867</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-04-20T14:51:24Z</dc:date>
    </item>
  </channel>
</rss>

