<?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: How to fix wrong timestamping issues? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288172#M55075</link>
    <description>&lt;P&gt;If &lt;CODE&gt;_indextime&lt;/CODE&gt; is earlier than &lt;CODE&gt;_time&lt;/CODE&gt;, then one of the following is true:&lt;/P&gt;

&lt;P&gt;The timestamping entity (the process writing to the file on the forwarder) is writing the wrong time.  This is usually because the host OS has the wrong time.  This is usually because the admin of that device neglected to setup &lt;CODE&gt;NTP&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;The timestamping entity is using a proper &lt;CODE&gt;TZ&lt;/CODE&gt; but is not writing this &lt;CODE&gt;TZ&lt;/CODE&gt; in the timestamp.  This can be fixed by using the &lt;CODE&gt;TZ=&lt;/CODE&gt;feature and deploying this to the forwarder (if post 6.0) or the Indexers (if pre-6.0).&lt;/P&gt;

&lt;P&gt;The timestamping entity is using the wrong&lt;CODE&gt;TZ&lt;/CODE&gt; and is writing this &lt;CODE&gt;TZ&lt;/CODE&gt; in the timestamp.  In the short-term, this can be fixed using the &lt;CODE&gt;TZ_ALIAS=&lt;/CODE&gt; feature, but the proper fix is to correct the timestamping entity's insanity.&lt;/P&gt;

&lt;P&gt;You have not correctly told Splunk where to find the timestamp (DO NOT EVER allow it to automatically timestamp: tell it &lt;EM&gt;exactly&lt;/EM&gt; where and in what format the timestamp is) so it is mistaking non-timestamp data as a timestamp, misinterpreting the timestamp, or giving up on finding it and timestamping it with the previous event's timestamp or the current Indexer time.&lt;/P&gt;

&lt;P&gt;ON RARE OCCASION the indexer has the wrong time (see the first point about &lt;CODE&gt;NTP&lt;/CODE&gt;) and so &lt;CODE&gt;_indextime&lt;/CODE&gt; is wrong.&lt;/P&gt;

&lt;P&gt;Many people get tired of playing whack-a-mole on this problem and elect to let the Indexer's timestamp such that &lt;CODE&gt;_inedextime&lt;/CODE&gt; is always used for &lt;CODE&gt;_time&lt;/CODE&gt; by using &lt;CODE&gt;DATETIME_CONFIG = CURRENT&lt;/CODE&gt; OR to let the forwarder do it by using &lt;CODE&gt;DATETIME_CONFIG = NONE&lt;/CODE&gt;:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I personally would not take the last approach but work to fix it PROPERLY, but sometimes "close enough is good enough".&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2017 23:59:20 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-03-28T23:59:20Z</dc:date>
    <item>
      <title>How to fix wrong timestamping issues?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288170#M55073</link>
      <description>&lt;P&gt;I missed some of the events for my search query, when I try to evaluate the time diff between event time and index time, Index time is early than event time. How can I resolve the timing issue?  Where should I navigate and check??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Bullseye sourcetype=BullseyeAppLogs source="\\\\BP1XTXII492\\BULLSEYE.logs.devc$\\1817*.log" | eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S") | eval diff= _indextime-_time | table _time, indextime, diff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output:&lt;/P&gt;

&lt;P&gt;_time↕                                            indextime↕           diff↕ &lt;/P&gt;

&lt;P&gt;2017-03-22   18:56:13      2017-03-22   19:01:48     335&lt;BR /&gt;&lt;BR /&gt;
2017-03-22    18:55:45     2017-03-22   19:01:48     363&lt;BR /&gt;&lt;BR /&gt;
2017-03-22    18:44:03     2017-03-24   18:28:29    171866&lt;BR /&gt;&lt;BR /&gt;
2017-03-22    18:43:27    2017-03-24    18:28:29    171902&lt;BR /&gt;&lt;BR /&gt;
2017-03-22     18:42:41    2017-03-22    18:44:57    136&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:42:26  2017-03-22 18:44:57  151&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:34:35  2017-03-22 18:35:09  34&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:33:55  2017-03-22 18:35:09  74&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:33:48  2017-03-24 18:28:02  172454&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:33:14  2017-03-24 18:28:02  172488&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:31:09  2017-03-24 18:28:24  172635&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:30:46  2017-03-24 18:27:15  172589&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:30:42  2017-03-24 18:28:24  172662&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:30:35  2017-03-24 18:27:10  172595&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:29:48  2017-03-24 18:27:15  172647&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:29:02  2017-03-24 18:27:10  172688&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:19:43  2017-03-24 18:28:21  173318&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:19:11  2017-03-24 18:28:21  173350&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:16:57  2017-03-22 18:18:02  65&lt;BR /&gt;&lt;BR /&gt;
2017-03-22 18:16:24  2017-03-22 18:18:02  98  &lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 22:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288170#M55073</guid>
      <dc:creator>rangineniarunku</dc:creator>
      <dc:date>2017-03-24T22:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix wrong timestamping issues?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288171#M55074</link>
      <description>&lt;P&gt;Assuming your logs are not printing future-based date/time stamps within them, then perhaps Splunk is not correctly parsing the date/time.&lt;/P&gt;

&lt;P&gt;I would suggest you refer to &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Handleeventtimestamps"&gt;Configure event timestamps&lt;/A&gt;  , in particular the link to &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configuretimestamprecognition"&gt;Configure timestamp recognition&lt;/A&gt; .&lt;BR /&gt;
Just make sure you configure the timestamp recognition at the heavy forwarder or indexer level where the data is sent to.&lt;/P&gt;

&lt;P&gt;For most sourcetypes I configure time parsing by using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = 
TIME_FORMAT = 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also sometimes configure:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD = 
TZ = 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When required.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2017 04:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288171#M55074</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2017-03-25T04:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix wrong timestamping issues?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288172#M55075</link>
      <description>&lt;P&gt;If &lt;CODE&gt;_indextime&lt;/CODE&gt; is earlier than &lt;CODE&gt;_time&lt;/CODE&gt;, then one of the following is true:&lt;/P&gt;

&lt;P&gt;The timestamping entity (the process writing to the file on the forwarder) is writing the wrong time.  This is usually because the host OS has the wrong time.  This is usually because the admin of that device neglected to setup &lt;CODE&gt;NTP&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;The timestamping entity is using a proper &lt;CODE&gt;TZ&lt;/CODE&gt; but is not writing this &lt;CODE&gt;TZ&lt;/CODE&gt; in the timestamp.  This can be fixed by using the &lt;CODE&gt;TZ=&lt;/CODE&gt;feature and deploying this to the forwarder (if post 6.0) or the Indexers (if pre-6.0).&lt;/P&gt;

&lt;P&gt;The timestamping entity is using the wrong&lt;CODE&gt;TZ&lt;/CODE&gt; and is writing this &lt;CODE&gt;TZ&lt;/CODE&gt; in the timestamp.  In the short-term, this can be fixed using the &lt;CODE&gt;TZ_ALIAS=&lt;/CODE&gt; feature, but the proper fix is to correct the timestamping entity's insanity.&lt;/P&gt;

&lt;P&gt;You have not correctly told Splunk where to find the timestamp (DO NOT EVER allow it to automatically timestamp: tell it &lt;EM&gt;exactly&lt;/EM&gt; where and in what format the timestamp is) so it is mistaking non-timestamp data as a timestamp, misinterpreting the timestamp, or giving up on finding it and timestamping it with the previous event's timestamp or the current Indexer time.&lt;/P&gt;

&lt;P&gt;ON RARE OCCASION the indexer has the wrong time (see the first point about &lt;CODE&gt;NTP&lt;/CODE&gt;) and so &lt;CODE&gt;_indextime&lt;/CODE&gt; is wrong.&lt;/P&gt;

&lt;P&gt;Many people get tired of playing whack-a-mole on this problem and elect to let the Indexer's timestamp such that &lt;CODE&gt;_inedextime&lt;/CODE&gt; is always used for &lt;CODE&gt;_time&lt;/CODE&gt; by using &lt;CODE&gt;DATETIME_CONFIG = CURRENT&lt;/CODE&gt; OR to let the forwarder do it by using &lt;CODE&gt;DATETIME_CONFIG = NONE&lt;/CODE&gt;:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I personally would not take the last approach but work to fix it PROPERLY, but sometimes "close enough is good enough".&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 23:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-fix-wrong-timestamping-issues/m-p/288172#M55075</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-28T23:59:20Z</dc:date>
    </item>
  </channel>
</rss>

