<?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 Indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128189#M26318</link>
    <description>&lt;P&gt;Thanks so much for the response.  This still doesn't work for me.  My sample data is below.  I don't really care if any of the dates are used as timestamps.  Today's date as default would be fine.  I just want separate events to be recognized.&lt;/P&gt;

&lt;P&gt;{"respId":"search","status":"0","events":[{"name":"event1","startDate":"20150404:1600",...move stuff,"dateReceived":"20150405:0000"},{"name":"event2",.........}],"count":"500"}&lt;/P&gt;

&lt;P&gt;If I use the default _json (Indexed_extractions = json) I end up with fields respId, status, events{}:name, events{}:startDate, events{}:dateReceived etc.  where all the data for these fields is now crammed into the one field - i.e., one event.&lt;BR /&gt;
My props.conf fields are&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
TIME_FORMAT = %Y%m%d:%H%M&lt;BR /&gt;
BREAK_ONLY_BEFORE = {"name"&lt;BR /&gt;
TIME_PREFIX = dateReceived":&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:40:33 GMT</pubDate>
    <dc:creator>hkeebler</dc:creator>
    <dc:date>2020-09-28T19:40:33Z</dc:date>
    <item>
      <title>Json Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128186#M26315</link>
      <description>&lt;P&gt;We are trying parse a Json file for indexing. While parsing we have two events in the json file mentioned below&lt;/P&gt;

&lt;P&gt;[&lt;BR /&gt;
    {&lt;BR /&gt;
        "timestamp": "2014-04-07 00:00:36.297",&lt;BR /&gt;
        "source": "HOST",&lt;BR /&gt;
        "sourcetype": "Windows",&lt;BR /&gt;
        "host": "10.10.10.10",&lt;BR /&gt;
        "hardwareRevision": "0200"&lt;BR /&gt;
    },&lt;BR /&gt;
    {&lt;BR /&gt;
        "timestamp": "2014-04-07 00:00:36.297",&lt;BR /&gt;
        "source": "HOST",&lt;BR /&gt;
        "sourcetype": "LINUX",&lt;BR /&gt;
        "host": "10.10.10.20",&lt;BR /&gt;
        "hardwareRevision": "NA"&lt;BR /&gt;
    }&lt;BR /&gt;
]&lt;/P&gt;

&lt;P&gt;I am declaring the following params in props.conf&lt;/P&gt;

&lt;P&gt;KV_MODE=json&lt;BR /&gt;
NO_BINARY_CHECK=1&lt;BR /&gt;
TIME_FORMAT=%Y-%m-%d %H:%M:%S.%3N&lt;/P&gt;

&lt;P&gt;But indexer recognizes only one event instead of two. It doesn't recognizes second time stamp.  I don't see any examples of props.conf for Json on the internet. Is there is any samples of props.conf how it should look like for the Json file.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128186#M26315</guid>
      <dc:creator>nsiva23</dc:creator>
      <dc:date>2020-09-28T16:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Json Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128187#M26316</link>
      <description>&lt;P&gt;Did anyone ever answer your question?  I have the same issue now.  I have something that is all json and includes a json array "outages: [{event1},{event2},....] ".  I cannot get it to recognize separate events, even with the BREAK_ONLY_BEFORE = clause.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128187#M26316</guid>
      <dc:creator>hkeebler</dc:creator>
      <dc:date>2020-09-28T19:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Json Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128188#M26317</link>
      <description>&lt;P&gt;Since you have multiple time stamps in the event, you need select the right one for Splunk to recognize.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Your format should be the :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timestamp": "2014-04-07 00:00:36.297",
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Portion from your json.&lt;/P&gt;

&lt;P&gt;So in your props, your timestamp format should be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%Y-%m-%d %H:%M:%S.%3N
 TIME_PREFIX= \t
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure if there is a tab, you could also try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = (AM\s|PM\s)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That looks for AM OR PM (not its followed by a space. That might be a tab in your json..)&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 15:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128188#M26317</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-04-24T15:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Json Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128189#M26318</link>
      <description>&lt;P&gt;Thanks so much for the response.  This still doesn't work for me.  My sample data is below.  I don't really care if any of the dates are used as timestamps.  Today's date as default would be fine.  I just want separate events to be recognized.&lt;/P&gt;

&lt;P&gt;{"respId":"search","status":"0","events":[{"name":"event1","startDate":"20150404:1600",...move stuff,"dateReceived":"20150405:0000"},{"name":"event2",.........}],"count":"500"}&lt;/P&gt;

&lt;P&gt;If I use the default _json (Indexed_extractions = json) I end up with fields respId, status, events{}:name, events{}:startDate, events{}:dateReceived etc.  where all the data for these fields is now crammed into the one field - i.e., one event.&lt;BR /&gt;
My props.conf fields are&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
TIME_FORMAT = %Y%m%d:%H%M&lt;BR /&gt;
BREAK_ONLY_BEFORE = {"name"&lt;BR /&gt;
TIME_PREFIX = dateReceived":&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-Indexing/m-p/128189#M26318</guid>
      <dc:creator>hkeebler</dc:creator>
      <dc:date>2020-09-28T19:40:33Z</dc:date>
    </item>
  </channel>
</rss>

