<?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 Use JSON epoch date time instead of index time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370721#M67320</link>
    <description>&lt;P&gt;I have a JSON that is for emails like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{   [-] 
     computer:  {   [+] 
    }   
     date:   2018-03-08T11:42:57+00:00      
     event_type_id:  553648152  
     timestamp:  1520509377 
     timestamp_nanoseconds:  893334279  
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: the time above is in UTC.&lt;/P&gt;

&lt;P&gt;However, my time is set to  PST and so it looks like I'm getting the index time, timestamp of &lt;STRONG&gt;"11/14/17 6:50:49.000 PM"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This is what's in my props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:amp:json]
SHOULD_LINEMERGE = true
pulldown_type = 1
category = Splunk App Add-on Builder
LINE_BREAKER = ([\r\n]*)\{\"event_type\"\:
TIME_PREFIX = timestamp:\s*
TIME_FORMAT = %s
KV_MODE = json
TRANSFORMS-amp_hostname = force_amp_hostname
EXTRACT-amp_hostname = \"hostname\"\:\s*\"(?&amp;lt;dest&amp;gt;[^\"]*)
EXTRACT-amp_file_name = \"file_name\"\:\s*\"(?&amp;lt;file_name&amp;gt;[^\"]*)
EXTRACT-amp_file_path = \"file_path\"\:\s*\"(?&amp;lt;file_path&amp;gt;[^\"]*)
EXTRACT-amp_user = \"user\"\:\s?\"(?&amp;lt;user&amp;gt;[^\"]+)
EVAL-signature =
EVAL-action =
EVAL-file_hash =
BREAK_ONLY_BEFORE = ([\r\n]*)\{\"event_type\"\:
DATETIME_CONFIG =
NO_BINARY_CHECK = true
disabled = false
INDEXED_EXTRACTIONS = json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Nov 2017 02:59:18 GMT</pubDate>
    <dc:creator>mkarimi17</dc:creator>
    <dc:date>2017-11-15T02:59:18Z</dc:date>
    <item>
      <title>Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370721#M67320</link>
      <description>&lt;P&gt;I have a JSON that is for emails like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{   [-] 
     computer:  {   [+] 
    }   
     date:   2018-03-08T11:42:57+00:00      
     event_type_id:  553648152  
     timestamp:  1520509377 
     timestamp_nanoseconds:  893334279  
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: the time above is in UTC.&lt;/P&gt;

&lt;P&gt;However, my time is set to  PST and so it looks like I'm getting the index time, timestamp of &lt;STRONG&gt;"11/14/17 6:50:49.000 PM"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This is what's in my props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:amp:json]
SHOULD_LINEMERGE = true
pulldown_type = 1
category = Splunk App Add-on Builder
LINE_BREAKER = ([\r\n]*)\{\"event_type\"\:
TIME_PREFIX = timestamp:\s*
TIME_FORMAT = %s
KV_MODE = json
TRANSFORMS-amp_hostname = force_amp_hostname
EXTRACT-amp_hostname = \"hostname\"\:\s*\"(?&amp;lt;dest&amp;gt;[^\"]*)
EXTRACT-amp_file_name = \"file_name\"\:\s*\"(?&amp;lt;file_name&amp;gt;[^\"]*)
EXTRACT-amp_file_path = \"file_path\"\:\s*\"(?&amp;lt;file_path&amp;gt;[^\"]*)
EXTRACT-amp_user = \"user\"\:\s?\"(?&amp;lt;user&amp;gt;[^\"]+)
EVAL-signature =
EVAL-action =
EVAL-file_hash =
BREAK_ONLY_BEFORE = ([\r\n]*)\{\"event_type\"\:
DATETIME_CONFIG =
NO_BINARY_CHECK = true
disabled = false
INDEXED_EXTRACTIONS = json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Nov 2017 02:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370721#M67320</guid>
      <dc:creator>mkarimi17</dc:creator>
      <dc:date>2017-11-15T02:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370722#M67321</link>
      <description>&lt;P&gt;Are you looking for the timezone setting in the props.conf file ? As in TZ = UTC or similar?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 07:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370722#M67321</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2017-11-15T07:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370723#M67322</link>
      <description>&lt;P&gt;I tried that as well, sorry forgot to include it.  But yeah that doesn't work either.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 16:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370723#M67322</guid>
      <dc:creator>mkarimi17</dc:creator>
      <dc:date>2017-11-15T16:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370724#M67323</link>
      <description>&lt;P&gt;@garethatiag, I have converted to comment since it seemed more like a question than answer.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 18:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370724#M67323</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-15T18:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370725#M67324</link>
      <description>&lt;P&gt;Did you check _internal logs for timestamp extraction related errors or warnings?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 19:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370725#M67324</guid>
      <dc:creator>danbar6</dc:creator>
      <dc:date>2017-11-15T19:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370726#M67325</link>
      <description>&lt;P&gt;@mkarimi17, the JSON in the sample, is that not how the data is sent? i.e. &lt;CODE&gt;date:     2018-03-08T11:42:57+00:00&lt;/CODE&gt; does not exist in your _raw data.&lt;/P&gt;

&lt;P&gt;If your Timezone is set to PST using &lt;CODE&gt;Logged in User &amp;gt; Account Settings&lt;/CODE&gt; in Splunk, then you should see event time as PST although the logged time in raw data is UTC.&lt;/P&gt;

&lt;P&gt;What time do you see when you try to display the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| table _time date_hour _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Nov 2017 02:50:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370726#M67325</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-16T02:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON epoch date time instead of index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370727#M67326</link>
      <description>&lt;P&gt;in your inputs.conf (on the forwarder) setting you need this:&lt;/P&gt;

&lt;P&gt;[monitor://path/to/file]&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;/P&gt;

&lt;P&gt;then in props use &lt;BR /&gt;
[cisco:amp:json]&lt;BR /&gt;
TIMESTAMP_FIELDS = timestamp&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 17:16:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-JSON-epoch-date-time-instead-of-index-time/m-p/370727#M67326</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-11-22T17:16:31Z</dc:date>
    </item>
  </channel>
</rss>

