<?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 format is not getting indexed in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159868#M32427</link>
    <description>&lt;P&gt;Is it "not getting indexed," or is it "not getting indexed &lt;STRONG&gt;properly&lt;/STRONG&gt;?"&lt;/P&gt;

&lt;P&gt;Another thing I'm not sure of is your JSON format. As I recall JSON data doesn't have enclosing square brackets ([]). It should only have curly braces ({}) for enclosing the data. If it doesn't conform to JSON standards, it will not index it properly. You should set:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = json
SHOULD_LINEMERGE = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then it will properly index it as JSON data.&lt;/P&gt;

&lt;P&gt;I also agree with &lt;EM&gt;ssievert&lt;/EM&gt; that you should have a timestamp in the JSON if you can.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2015 23:39:30 GMT</pubDate>
    <dc:creator>cpetterborg</dc:creator>
    <dc:date>2015-02-25T23:39:30Z</dc:date>
    <item>
      <title>Json format is not getting indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159866#M32425</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to analyze the json file for some reason it is not getting indexed.&lt;BR /&gt;
Here is a sample json file&lt;BR /&gt;
[&lt;BR /&gt;
 {&lt;BR /&gt;
    "FIELD1":"CNE",&lt;BR /&gt;
    "FIELD2":"cleanAndEnrich._130rfmtBR_StdAddrEnrch",&lt;BR /&gt;
    "FIELD3":"REC_READ",&lt;BR /&gt;
    "FIELD4":"",&lt;BR /&gt;
    "FIELD5":"",&lt;BR /&gt;
    "FIELD6":"5",&lt;BR /&gt;
    "FIELD7":""&lt;BR /&gt;
  },&lt;BR /&gt;
  {&lt;BR /&gt;
    "FIELD1":"CNE",&lt;BR /&gt;
    "FIELD2":"CNE",&lt;BR /&gt;
    "FIELD3":"REC_READ",&lt;BR /&gt;
    "FIELD4":"POLICY",&lt;BR /&gt;
    "FIELD5":"RA",&lt;BR /&gt;
    "FIELD6":"0",&lt;BR /&gt;
    "FIELD7":""&lt;BR /&gt;
  }&lt;BR /&gt;
]&lt;/P&gt;

&lt;P&gt;Here is my props.conf and input.conf&lt;/P&gt;

&lt;P&gt;[monitor:///opt/test/data/json_log/*.json]&lt;BR /&gt;
host = localhost&lt;BR /&gt;
source = jsonlog&lt;BR /&gt;
sourcetype = zajsonlog&lt;/P&gt;

&lt;P&gt;[root@sandbox local]# tail -10 props.conf&lt;BR /&gt;
[source::/opt/test/data/json_log/*.json]&lt;BR /&gt;
sourcetype = zajsonlog&lt;/P&gt;

&lt;P&gt;[zajsonlog]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TIMESTAMP_FIELDS = datetime&lt;BR /&gt;
TIME_FORMAT = %m-%d-%Y %H:%M:%S.%l %z&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:03:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159866#M32425</guid>
      <dc:creator>htsvaggar</dc:creator>
      <dc:date>2020-09-28T19:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Json format is not getting indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159867#M32426</link>
      <description>&lt;P&gt;I think we need a bit more detail. There is no datetime field in your sample data. You don't really need your [source::] stanza if you already set the sourcetype in inputs.conf (which is hopefully what your file is called instead of input.conf).&lt;/P&gt;

&lt;P&gt;I'd recommend taking a look at splunkd.log for hints as to why the file is not being picked up.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:15:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159867#M32426</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-02-25T21:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Json format is not getting indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159868#M32427</link>
      <description>&lt;P&gt;Is it "not getting indexed," or is it "not getting indexed &lt;STRONG&gt;properly&lt;/STRONG&gt;?"&lt;/P&gt;

&lt;P&gt;Another thing I'm not sure of is your JSON format. As I recall JSON data doesn't have enclosing square brackets ([]). It should only have curly braces ({}) for enclosing the data. If it doesn't conform to JSON standards, it will not index it properly. You should set:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = json
SHOULD_LINEMERGE = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then it will properly index it as JSON data.&lt;/P&gt;

&lt;P&gt;I also agree with &lt;EM&gt;ssievert&lt;/EM&gt; that you should have a timestamp in the JSON if you can.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 23:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159868#M32427</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2015-02-25T23:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Json format is not getting indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159869#M32428</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Now I am getting different issue with json. transaction is repeating  twice for every record  in UI.&lt;/P&gt;

&lt;P&gt;Is it UI issue  or I am doing something wrong. Here is the sample display from the event. If you see Description attribute is repeating twice in the bottom. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
                  "Id":"7097",
                  "ComponentTypeName":"Metcon",
                  "OwnershipLevelName":"Global",
                  "UserName":null,
                  "Name":"Fran",
                  "Description":"21-15-9 \nThrusters, 95# / 65# \nPull-ups",
                  "IsBenchmark":"True",
                  "HasBeenSaved":"True",
                  "IsNewComponentEmailSent":"False",
                  "AllowRxPlus":"False",
                  "Rounds":"0",
                  "Comments":null,
                  "RepScheme":null,
                  "PerformanceResultTypeName":"Time"
               }
Show syntax highlighted
Collapse
Description = 21-15-9 Thrusters, 95# / 65# Pull-ups Description = 21-15-9 Thrusters, 95# / 65# Pull-ups Id = 7097 Id = 7097 Name = Fran Name = Fran
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Sanjeev&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2015 21:23:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159869#M32428</guid>
      <dc:creator>htsvaggar</dc:creator>
      <dc:date>2015-02-27T21:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Json format is not getting indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159870#M32429</link>
      <description>&lt;P&gt;Can you supply an image screenshot of the results? That will be easier to figure out what is there.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2015 21:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-format-is-not-getting-indexed/m-p/159870#M32429</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2015-02-27T21:56:28Z</dc:date>
    </item>
  </channel>
</rss>

