<?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: Log File Monitoring giving me the future timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381570#M68818</link>
    <description>&lt;P&gt;Hi Sarvesh_11, &lt;/P&gt;

&lt;P&gt;As described in my answer to your question, you need to set your props.conf to:&lt;/P&gt;

&lt;P&gt;DATETIME_CONFIG = NONE&lt;/P&gt;

&lt;P&gt;As I explain below, this would give all events the same timestamp, based on the modification time. &lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 12:48:24 GMT</pubDate>
    <dc:creator>solarboyz1</dc:creator>
    <dc:date>2019-03-28T12:48:24Z</dc:date>
    <item>
      <title>Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381566#M68814</link>
      <description>&lt;P&gt;Hello folks,&lt;BR /&gt;
Would like to grab your intention, on my current issue with Splunk. Please help me with you r valuable inputs.&lt;BR /&gt;
I am monitoring logs file in splunk. Which has foretasted computation period.&lt;/P&gt;

&lt;P&gt;Example Computation period is from 00:00:00 to 23:59:59 27th March,2019. &lt;/P&gt;

&lt;P&gt;So my batch is running every hour, and logging it to a directory in a log file.&lt;BR /&gt;
Now when i look for these logs on splunk, i gets 3 different time stamp.&lt;/P&gt;

&lt;P&gt;1 is the 12:00:00 AM 27th March, 2019.&lt;BR /&gt;
2 is my current hour, on which i my cron is running.&lt;BR /&gt;
3 is 23:59:59 27th March, 2019.&lt;/P&gt;

&lt;P&gt;These are the time stamp for each of the cron.&lt;/P&gt;

&lt;P&gt;What configuration changes shall i make, to make it a 1 single time stamp, i.e the current cron time?&lt;BR /&gt;
Well this is scenario of 1 of my batch, i have 3 more, which has computation period of a week also.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 09:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381566#M68814</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-03-27T09:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381567#M68815</link>
      <description>&lt;P&gt;Could you please share some sample raw data from your logs and what's the current event process/sourcetype config/props.conf entry you've setup?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381567#M68815</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-27T19:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381568#M68816</link>
      <description>&lt;P&gt;Splunk assigns timestamps as follows:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Data/HowSplunkextractstimestamps" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Data/HowSplunkextractstimestamps&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk software uses the following precedence rules to assign timestamps to events: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;It looks for a time or date in the event itself using an explicit TIME_FORMAT, if provided. You configure the TIME_FORMAT attribute in props.conf.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If no TIME_FORMAT was configured for the data, Splunk software attempts to automatically identify a time or date in the event itself. It uses the source type of the event (which includes TIME_FORMAT information) to try to find the timestamp.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If an event has a time and date, but not a year, Splunk software determines the year, as described in How Splunk software determines timestamps with no year, and builds the timestamp from that.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If no events in a source have a date, Splunk software tries to find a date in the source name or file name. Time of day is not identified in filenames. (This requires that the events have a time, even though they don't have a date.) &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;For file sources, if no date can be identified in the file name, Splunk software uses the file modification time.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;As a last resort, Splunk software sets the timestamp to the current system time when indexing each event.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;If you want to configure it so all events in the file receive the same timestamp, you can set &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = NONE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should set the timestamp for all events to the modification time of the file:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/admin/Propsconf#Timestamp_extraction_configuration" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/admin/Propsconf#Timestamp_extraction_configuration&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For file-based inputs (monitor, batch) the time chosen will be the modification timestamp on the file being read.&lt;/P&gt;

&lt;P&gt;Which should be the end of the cron execution, when the last event was written to the file. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:53:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381568#M68816</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2020-09-29T23:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381569#M68817</link>
      <description>&lt;P&gt;Hi Somesh,&lt;BR /&gt;
I guess no, i am not havnig enough karma points to put ant screenshot or file.&lt;BR /&gt;
Although in props.sonf i have defined DATETIME_CONFIG=auto.&lt;BR /&gt;
I just want to clarify, if splunk is taking the time stamp from the event inside the log file, instead of the timestamp of the file modified. How can i get the sinlge time stamp, i.e ignore or manipulate the event time stamp, what it is taking from inside the log file.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 05:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381569#M68817</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-03-28T05:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381570#M68818</link>
      <description>&lt;P&gt;Hi Sarvesh_11, &lt;/P&gt;

&lt;P&gt;As described in my answer to your question, you need to set your props.conf to:&lt;/P&gt;

&lt;P&gt;DATETIME_CONFIG = NONE&lt;/P&gt;

&lt;P&gt;As I explain below, this would give all events the same timestamp, based on the modification time. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 12:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381570#M68818</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2019-03-28T12:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381571#M68819</link>
      <description>&lt;P&gt;Hi @solarboyz1 ,&lt;BR /&gt;
Can you propose any other solution for the same. Can we control this on Search Head SPL Query. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 06:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381571#M68819</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-03-29T06:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381572#M68820</link>
      <description>&lt;P&gt;Hi @somesoni2  ,&lt;BR /&gt;
Thanks for replying.&lt;/P&gt;

&lt;P&gt;1st) I was trying to make changes on /opt/SplunkUniversalForwarder/etc/system/local/, here i have created one props.conf, evaluating my sourcetype, with DATETIME_CONFIG=NONE&lt;/P&gt;

&lt;P&gt;2nd) I cannot use the timestamp from the events because, the 1st issue what m facing is, i am not getting the data 1 file in single shot on search head, as it is taking the time stamp from the event. so it is showing forecasted time also, where as i just want to monitor this file every hour. i cannot increase my time range to past 24 hours. and also, the conclusion sentence , the keywords we wants to capture, appears at the last of every file, which is visible at 23:59:59, like if i am monitoring file at 9AM i wont be able to see that conclusion sentence in that file at that time.&lt;/P&gt;

&lt;P&gt;3rd) Are you expecting me to make changes in the props.conf of Indexer, till now what changes i am making was all in Universal Forwarder.&lt;/P&gt;

&lt;P&gt;SO what i am finally left is the index time of 1 file should be sync with the content of that file. i.r 1 source file should have only 1 timestamp. i.e the last modified file time.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 08:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381572#M68820</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-04-03T08:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381573#M68821</link>
      <description>&lt;P&gt;Hi @solarboyz1 ,&lt;BR /&gt;
Thanks for replying.&lt;/P&gt;

&lt;P&gt;1st) I was trying to make changes on /opt/SplunkUniversalForwarder/etc/system/local/, here i have created one props.conf, evaluating my sourcetype, with DATETIME_CONFIG=NONE&lt;/P&gt;

&lt;P&gt;2nd) I cannot use the timestamp from the events because, the 1st issue what m facing is, i am not getting the data 1 file in single shot on search head, as it is taking the time stamp from the event. so it is showing forecasted time also, where as i just want to monitor this file every hour. i cannot increase my time range to past 24 hours. and also, the conclusion sentence , the keywords we wants to capture, appears at the last of every file, which is visible at 23:59:59, like if i am monitoring file at 9AM i wont be able to see that conclusion sentence in that file at that time.&lt;/P&gt;

&lt;P&gt;3rd) Are you expecting me to make changes in the props.conf of Indexer, till now what changes i am making was all in Universal Forwarder.&lt;/P&gt;

&lt;P&gt;SO what i am finally left is the index time of 1 file should be sync with the content of that file. i.r 1 source file should have only 1 timestamp. i.e the last modified file time.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 08:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381573#M68821</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-04-03T08:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381574#M68822</link>
      <description>&lt;P&gt;the only way to do this on the search head via SPL, would be to make the timestamp you want to use available in the event.  &lt;/P&gt;

&lt;P&gt;For example if the files were created with the timestamp in the name:  logfile-03_04_2005_01_02_30.log&lt;BR /&gt;
then you could do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=source ".*-(?&amp;lt;mon&amp;gt;\d+)_(?&amp;lt;day&amp;gt;\d+)_(?&amp;lt;year&amp;gt;\d+)_(?&amp;lt;hour&amp;gt;\d+)_(?&amp;lt;min&amp;gt;\d+)_(?&amp;lt;sec&amp;gt;\d+).log" 
| eval event_time=mon. "/" .day. "/" .year. ":" .hour. ":" .min. "sec"
| eval _time=strptime(event_time, "%m/%d/%Y:%H:%M:%S")
| timechart count 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:56:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381574#M68822</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2020-09-29T23:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381575#M68823</link>
      <description>&lt;P&gt;&lt;EM&gt;Are you expecting me to make changes in the props.conf of Indexer, till now what changes i am making was all in Universal Forwarder&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I think the timestamp and hostname are extracted on the UF, so it would probably work if only on the UF.  But Im not positive which is why I recommended putting it on the indexer as well. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 10:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381575#M68823</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2019-04-03T10:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381576#M68824</link>
      <description>&lt;P&gt;Hey @solarboyz1 &lt;BR /&gt;
Really appreciate your prompt response.&lt;BR /&gt;
This can be handle on the search head, i agree!&lt;BR /&gt;
But as i mentioned, the scenario is, &lt;BR /&gt;
Lets take an example, my log file is created at 02:00:00 AM at my source, now when my cron runs, i get the logs on splunk at 2:10:10. 3rd April But not the complete logs, not the complete content of the file is visible.&lt;BR /&gt;
Below content i am able to see at at 23:59:59, while this is written already in the log file, which is modified at 02:00:00&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"Bill End Date      : 04/03/2019 23:59:59&lt;BR /&gt;
Scheduled Read Date: 04/03/2019&lt;BR /&gt;
Number of Days     : 1&lt;BR /&gt;
-------------------------------- Page ----------------------------------&lt;BR /&gt;
--- RunRS completed successfully ---"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Because of this ambiguity, i am focusing only on to get single time stamp for 1 log file. i am giving DATETIME_CONFIG= none in props.conf (/opt/SplunkUniversalForwarder/system/local/). Not sure i shall get the result with this or not.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 10:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381576#M68824</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-04-03T10:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381577#M68825</link>
      <description>&lt;P&gt;Hi @solarboyz1 ,&lt;BR /&gt;
can this be handled by outputs.conf?&lt;BR /&gt;
if i define below in system/local/outputs.conf&lt;/P&gt;

&lt;P&gt;[sourcetype / source]&lt;BR /&gt;
DATETIME_CONFIG = none &lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 08:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381577#M68825</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-04-04T08:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381578#M68826</link>
      <description>&lt;P&gt;No. &lt;/P&gt;

&lt;P&gt;outputs.conf deals with how the data is sent to other instances (i.e. UF to indexers). The options you listed are not valid for that configuration file:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Outputsconf"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Outputsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 13:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381578#M68826</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2019-04-04T13:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Log File Monitoring giving me the future timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381579#M68827</link>
      <description>&lt;P&gt;Thanks Man @solarboyz1 &lt;BR /&gt;
Appreciate your help.&lt;/P&gt;

&lt;P&gt;Will do changes in props.conf itself for time stamp resolution.&lt;BR /&gt;
[sourcetype]&lt;BR /&gt;
DATETIME_CONFIG= none&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 05:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-File-Monitoring-giving-me-the-future-timestamp/m-p/381579#M68827</guid>
      <dc:creator>sarvesh_11</dc:creator>
      <dc:date>2019-04-05T05:55:45Z</dc:date>
    </item>
  </channel>
</rss>

