<?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 data with date not indexed in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313835#M58779</link>
    <description>&lt;P&gt;My data are outputed by python script.&lt;BR /&gt;
My script output is json data.&lt;BR /&gt;
When the script output is {"test1":"2017-08-31", "test2":"12.34.56"}, data are not indexed, but when I delete the dot ".", data are indexed.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2017 11:57:08 GMT</pubDate>
    <dc:creator>osec2a</dc:creator>
    <dc:date>2017-08-31T11:57:08Z</dc:date>
    <item>
      <title>JSON data with date not indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313833#M58777</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to index JSON data  but Splunk refused to index it and I have no errors in logs.&lt;BR /&gt;
The format of my data is : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"test1":"2017-08-31", "test2":"12.34.56"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried many format :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"test1":"2017-08-31", "test2":"12.34.56"}" =&amp;gt; not indexed
{"test1":"12.34.56", "test2":"2017-08-31"}" =&amp;gt; not indexed
{"test1":"2017-08-31", "test2":2017/08/3"}"  = &amp;gt; indexed successfully
{"test1":"2017.08.31", "test2":17.08.3"}" =&amp;gt; indexed successfully
{"test1":"2017_08_31", "test2":17.08.3"}"  =&amp;gt; indexed successfully
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why Splunk doesn't want to index my JSON with these data :  &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;{"test1":"2017-08-31","test2":"12.34.56"}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 08:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313833#M58777</guid>
      <dc:creator>osec2a</dc:creator>
      <dc:date>2017-08-31T08:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data with date not indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313834#M58778</link>
      <description>&lt;P&gt;@osec2a, I tried adding &lt;CODE&gt;{"test1":"2017-08-31", "test2":"12.34.56"}&lt;/CODE&gt; and it worked fine for me.&lt;/P&gt;

&lt;P&gt;I had done Single File Upload in preview mode and I just created my Custom Sourcetype under "Search &amp;amp; Reporting App" with index="main".&lt;/P&gt;

&lt;P&gt;The data looked good in preview mode as well as after adding to index in Splunk Search.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 10:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313834#M58778</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-31T10:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data with date not indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313835#M58779</link>
      <description>&lt;P&gt;My data are outputed by python script.&lt;BR /&gt;
My script output is json data.&lt;BR /&gt;
When the script output is {"test1":"2017-08-31", "test2":"12.34.56"}, data are not indexed, but when I delete the dot ".", data are indexed.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 11:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313835#M58779</guid>
      <dc:creator>osec2a</dc:creator>
      <dc:date>2017-08-31T11:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data with date not indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313836#M58780</link>
      <description>&lt;P&gt;&lt;STRONG&gt;If you explicitly set the data format to be &lt;CODE&gt;%Y-%m-%d&lt;/CODE&gt;, does it work in all cases?&lt;/STRONG&gt; (props.conf) I suspect that by default Splunk is probably looking at 12.34.56 as a date string, and if it falls outside the range of the date you are looking at, or it is prior to 1970 (I'm assuming that 12.34.56 is a made up piece of data, but I have nothing else to go on), then you are not going to find it in your search or it is too old to be properly indexed.&lt;/P&gt;

&lt;P&gt;Also, though it is probably just a typo, your JSON data in your example data is bogus JSON. It probably should look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"test1":"2017-08-31", "test2":"12.34.56"} =&amp;gt; not indexed
{"test1":"12.34.56", "test2":"2017-08-31"} =&amp;gt; not indexed
{"test1":"2017-08-31", "test2":"2017/08/3"}  = &amp;gt; indexed successfully
{"test1":"2017.08.31", "test2":"17.08.3"} =&amp;gt; indexed successfully
{"test1":"2017_08_31", "test2":"17.08.3"}  =&amp;gt; indexed successfully
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/JSON-data-with-date-not-indexed/m-p/313836#M58780</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-08-31T14:20:38Z</dc:date>
    </item>
  </channel>
</rss>

