<?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 Time stamp stanza in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233412#M45530</link>
    <description>&lt;P&gt;I want to make sure i understand this, i have logs that splunk can not find the time stamp on. and some are missing. &lt;/P&gt;

&lt;P&gt;for the logs that have the time in them i would juse use this in props.conf on the Heavy forwaders correct? &lt;/P&gt;

&lt;P&gt;[source_type]&lt;BR /&gt;
TIME_PREFIX  = \d\d\/\w\w\w\/\d\d\d\d:\d\d:\d\d:\d\d&lt;BR /&gt;
TIME_FORMAT  = %d/%b/%Y%::z&lt;/P&gt;

&lt;P&gt;log looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--ab50cd40-A--
[25/Sep/2016:04:08:52 --0400] 
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the logs that do not have a time stamp, how to i set them to use indexed time for the time stamp? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--ab50cd30-A--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH

--ac50ad30-H--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH

--090e4955-A--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:17:57 GMT</pubDate>
    <dc:creator>sbattista09</dc:creator>
    <dc:date>2020-09-29T11:17:57Z</dc:date>
    <item>
      <title>Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233412#M45530</link>
      <description>&lt;P&gt;I want to make sure i understand this, i have logs that splunk can not find the time stamp on. and some are missing. &lt;/P&gt;

&lt;P&gt;for the logs that have the time in them i would juse use this in props.conf on the Heavy forwaders correct? &lt;/P&gt;

&lt;P&gt;[source_type]&lt;BR /&gt;
TIME_PREFIX  = \d\d\/\w\w\w\/\d\d\d\d:\d\d:\d\d:\d\d&lt;BR /&gt;
TIME_FORMAT  = %d/%b/%Y%::z&lt;/P&gt;

&lt;P&gt;log looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--ab50cd40-A--
[25/Sep/2016:04:08:52 --0400] 
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the logs that do not have a time stamp, how to i set them to use indexed time for the time stamp? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--ab50cd30-A--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH

--ac50ad30-H--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH

--090e4955-A--
BLAH BLAHBLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
BLAH BLAHBLAH BLAHBLAH BLAH
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233412#M45530</guid>
      <dc:creator>sbattista09</dc:creator>
      <dc:date>2020-09-29T11:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233413#M45531</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX =  .*?\[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S -%z
MAX_TIMESTAMP_LOOKAHEAD = 28
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is a good blog I put together if you have multiple time formats in the same log file and some events with nothing:  &lt;A href="http://blogs.splunk.com/2014/04/23/its-that-time-again"&gt;http://blogs.splunk.com/2014/04/23/its-that-time-again&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For events with no dates at all, just set:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = current
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Oct 2016 13:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233413#M45531</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2016-10-05T13:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233414#M45532</link>
      <description>&lt;P&gt;For the logs with timestamp, splunk should automatically recognize the timeformat. If it doesn't use this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%d/%b/%Y:%X
TIME_PREFIX=\[
MAX_TIMESTAMP_LOOKAHEAD=25
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the logs without timestamp, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG=CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Oct 2016 13:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233414#M45532</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-05T13:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233415#M45533</link>
      <description>&lt;P&gt;awesome! so its okay to add all this in one stanza in props.conf?&lt;/P&gt;

&lt;P&gt;[sourcetype_name]&lt;BR /&gt;
 TIME_PREFIX =  .*?[&lt;BR /&gt;
 TIME_FORMAT = %d/%b/%Y:%H:%M:%S -%z&lt;BR /&gt;
 MAX_TIMESTAMP_LOOKAHEAD = 28&lt;BR /&gt;
 DATETIME_CONFIG = current&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233415#M45533</guid>
      <dc:creator>sbattista09</dc:creator>
      <dc:date>2020-09-29T11:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233416#M45534</link>
      <description>&lt;P&gt;I believe that you can do it on the indexer by specifying the following in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf#Timestamp_extraction_configuration"&gt;props.conf&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf#Timestamp_extraction_configuration"&gt;props.conf&lt;/A&gt; documentation we can see that&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;"CURRENT"&lt;/EM&gt; will set the time of the event to the time that the event was&lt;BR /&gt;
   merged from lines, or worded differently, the time it passed through the&lt;BR /&gt;
   aggregator processor.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;EM&gt;DATETIME_CONFIG&lt;/EM&gt; is usually used to specify the file that configures the timestamp extractor,  but can also be used to prevent a timestamp extractor or assign the current system time to each event.&lt;/P&gt;

&lt;P&gt;More information can be found here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 13:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233416#M45534</guid>
      <dc:creator>tormodbp</dc:creator>
      <dc:date>2016-10-05T13:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time stamp stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233417#M45535</link>
      <description>&lt;P&gt;But DATETIME_CONFIG=current will override the settings for timestamp configurations and will set all timestamps to the current time.  I don't know your data so not sure if you need a custom DATETIME_CONFIG file.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-stamp-stanza/m-p/233417#M45535</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2020-09-29T11:17:15Z</dc:date>
    </item>
  </channel>
</rss>

