<?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: Timestamp set to Midnight in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358375#M174790</link>
    <description>&lt;P&gt;Can you try this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[flat_file]
TIME_PREFIX = ^(?=\s*)
MAX_TIMESTAMP_LOOKAHEAD = 22
TIME_FORMAT = %d/%m/%y %T
LINE_BREAKER = ([\n\r]+)
SHOULD_LINEMERGE = False
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 May 2017 09:14:26 GMT</pubDate>
    <dc:creator>dineshraj9</dc:creator>
    <dc:date>2017-05-04T09:14:26Z</dc:date>
    <item>
      <title>Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358366#M174781</link>
      <description>&lt;P&gt;The timestamp of an application log file is always being set to midnight, an example line in the logs is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;02/05/17 14:47:21 IN:[(1)29RET_YSCO      (2)(28)92 RINQ(28)1005183824(28)(28)10(28)990364911(28)457(28)7.50(28)Y(3)0CF9(4)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is given an event time of 02/05/2017 00:00:00.000&lt;/P&gt;

&lt;P&gt;The sourcetype config for this log in props.conf is as follows:&lt;/P&gt;

&lt;P&gt;[flat_file]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
LINE_BREAKER = [\r\n]+&lt;BR /&gt;
MAX_EVENTS = 1&lt;BR /&gt;
TIME_FORMAT = %d/%m/%y %H:%M:%S&lt;BR /&gt;
MAX_DAYS_AGO = 1&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 20&lt;/P&gt;

&lt;P&gt;When I test the sourcetype config with the same log file using the Add Data / Set Source Type functioanlity in Splunk it assigns the time from the log file correctly!  &lt;/P&gt;

&lt;P&gt;I'm ingesting numerous other logs (of different format) from the same host without issue.&lt;/P&gt;

&lt;P&gt;Can anyone see why the event time is always set to midnight for this log?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358366#M174781</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2020-09-29T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358367#M174782</link>
      <description>&lt;P&gt;hello,&lt;BR /&gt;
can you try and add &lt;CODE&gt;TIME_PERFIX = ^&lt;/CODE&gt; to your props.conf?&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 13:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358367#M174782</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-05-02T13:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358368#M174783</link>
      <description>&lt;P&gt;Your timestamp is only 18 long including the space at the front (so it's &amp;lt; 20). There is exactly one space between data and time in the data and the format, so the basics are covered.  &lt;/P&gt;

&lt;P&gt;1) Try adonio's suggestion first.  &lt;CODE&gt;TIME_PREFIX = ^&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If that doesn't fix the issue, then here's the next two shots in the increasingly pitch black dark... &lt;/P&gt;

&lt;P&gt;2) Try setting MAX_DAYS_AGO to 2 just in case there's a UTC vs local time thing going on.  &lt;/P&gt;

&lt;P&gt;3) Any chance it's somehow not being handled as [flat_file]?  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358368#M174783</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358369#M174784</link>
      <description>&lt;P&gt;I've added TIME_PREFIX = ^ to the props.conf but unfortunately no change.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 00:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358369#M174784</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-03T00:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358370#M174785</link>
      <description>&lt;P&gt;1) Added TIME_PREFIX = ^&lt;BR /&gt;
2) Changed MAX_DAYS_AGO to 2&lt;BR /&gt;
3) The sourcetype is being recorded correctly against the event.&lt;/P&gt;

&lt;P&gt;Unfortunatley the time is still always assigned as midnight! &lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
03/05/17 11:01:12 Msg: OUT:[(1)65RET_YSCO      (2)(28)15 VSNG(28)OK(28)68975261(28)12689300(28)D(28)KALRA(28)(3)(4)]&lt;/P&gt;

&lt;P&gt;Time&lt;BR /&gt;&lt;BR /&gt;
&lt;EM&gt;time -  2017-05-03T00:00:00.000+10:00&lt;BR /&gt;&lt;BR /&gt;
date_mday - 3&lt;BR /&gt;&lt;BR /&gt;
date_month - may&lt;BR /&gt;&lt;BR /&gt;
date_wday - wednesday&lt;BR /&gt;&lt;BR /&gt;
date_year - 2017&lt;BR /&gt;&lt;BR /&gt;
date_zone - 600 &lt;BR /&gt;
timeendpos - 8&lt;BR /&gt;&lt;BR /&gt;
timestartpos - 0&lt;BR /&gt;&lt;BR /&gt;
Default &lt;BR /&gt;
host - gis-syco-01&lt;BR /&gt;&lt;BR /&gt;
index - crown&lt;BR /&gt;&lt;BR /&gt;
punct - //&lt;/EM&gt;::&lt;EM&gt;:&lt;/EM&gt;:[()_____&lt;EM&gt;()()&lt;/EM&gt;()()()()()()()()]&lt;BR /&gt;&lt;BR /&gt;
source - /sysC/logs/simphony/MICpst.debug&lt;BR /&gt;&lt;BR /&gt;
sourcetype - flat_file&lt;BR /&gt;&lt;BR /&gt;
splunk_server - MIT-SPLUNK-T1   &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358370#M174785</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2020-09-29T13:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358371#M174786</link>
      <description>&lt;P&gt;Okay, one more shot in the dark. Suppose that innocent looking space is actually some other character?  Try this one. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %d/%m/%y\s+%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By the way, I assume you either made the conf changes through splunkweb and the CLI, or  restarted splunkd to pick up the new conf file if you made the changes manually?  &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.3/Admin/Configurationfilechangesthatrequirerestart"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.3/Admin/Configurationfilechangesthatrequirerestart&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The next shot in the next dark is all the way over the horizon and into the next ocean over... take your timestamp and verify exactly what characters in unicode are in the slashes and colons... &lt;/P&gt;

&lt;P&gt;Hmm.  Before I did that, I'd feed in a file with a 5/1 or prior date and see if it's getting 5/1 or 5/2 for that.  I'm expecting it would have to get the current date, if it's not properly identifying the timestamp as a timestamp.  If I'm wrong there, then we start beating the thickets for how it got the right date, and work from there.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 22:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358371#M174786</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-03T22:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358372#M174787</link>
      <description>&lt;P&gt;just adding a thought that maybe (huge maybe but I have seen it happen before) this space is a tab&lt;BR /&gt;
in that case:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = %d/%m/%y\t%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 May 2017 01:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358372#M174787</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-05-04T01:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358373#M174788</link>
      <description>&lt;P&gt;I have too, so it's not that much of a reach.  That's why I used &lt;CODE&gt;\s+&lt;/CODE&gt;, which will take away pretty much any white space characters.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 02:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358373#M174788</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-04T02:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358374#M174789</link>
      <description>&lt;P&gt;Tried adding both the \t and \s+ suggestion (and restarted the server) but no change!&lt;/P&gt;

&lt;P&gt;Really baffled by this one! even if it is ignoring the TIME_FORMAT in the props.conf, I don't understand why it is always assigning the time of midnight!&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 07:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358374#M174789</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-04T07:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358375#M174790</link>
      <description>&lt;P&gt;Can you try this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[flat_file]
TIME_PREFIX = ^(?=\s*)
MAX_TIMESTAMP_LOOKAHEAD = 22
TIME_FORMAT = %d/%m/%y %T
LINE_BREAKER = ([\n\r]+)
SHOULD_LINEMERGE = False
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 May 2017 09:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358375#M174790</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-05-04T09:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358376#M174791</link>
      <description>&lt;P&gt;Tried, no difference unfortunately, thanks for your suggestions though.&lt;/P&gt;

&lt;P&gt;To see if the props.conf was being read, I then removed the LINE_BREAKER and SHOULD_LINEMERGE entry, this had the expected affect of merging lines, so the props.conf entry is being used.&lt;/P&gt;

&lt;P&gt;I then removed all the TIME entries, so Splunk will go back to AUTO, no difference.  The timestartpos is always 0 and timeendpos is always 8??  Don't understabnd why it thinks this is the case!&lt;/P&gt;

&lt;P&gt;04/05/17 20:58:27 OUT:[(1)22RET_YSCO      (2)(28)38 VSNG(28)OK(28)69000359(28)10523189(28)H(28)NGUYEN(28)(3)(4)]&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;time - 2017-05-04T00:00:00.000+10:00&lt;BR /&gt;&lt;BR /&gt;
date_mday - 4&lt;BR /&gt;&lt;BR /&gt;
date_month - may&lt;BR /&gt;&lt;BR /&gt;
date_wday - thursday&lt;BR /&gt;&lt;BR /&gt;
date_year - 2017&lt;BR /&gt;&lt;BR /&gt;
date_zone - local&lt;BR /&gt;&lt;BR /&gt;
timeendpos - 8&lt;BR /&gt;&lt;BR /&gt;
timestartpos - 0&lt;BR /&gt;&lt;BR /&gt;
Default &lt;BR /&gt;
host - gis-syco-01&lt;BR /&gt;&lt;BR /&gt;
index - crown&lt;BR /&gt;&lt;BR /&gt;
punct - //&lt;/EM&gt;::&lt;EM&gt;:[()&lt;/EM&gt;____&lt;EM&gt;()()&lt;/EM&gt;()()()()()()()()]&lt;BR /&gt;&lt;BR /&gt;
source - /sysC/logs/simphony/MICpst.socket&lt;BR /&gt;&lt;BR /&gt;
sourcetype - flat_file&lt;BR /&gt;&lt;BR /&gt;
splunk_server - MIT-SPLUNK-T1   &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358376#M174791</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2020-09-29T13:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358377#M174792</link>
      <description>&lt;P&gt;As mentioned, if I use the Add Data functionality in Splunk, the sourcetype section shows the time is recognised correctly with the flat_file sourcetype, its even correct with the default!&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 11:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358377#M174792</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-04T11:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358378#M174793</link>
      <description>&lt;P&gt;does it extracts the correct timestamp using the Add Data function in GUI?&lt;BR /&gt;
made couple of attempts and indeed (in my splunk 6.5.2 on windows 10) it is extracted correctly with default configurations. maybe you have another props with the same sourcetype that overrides these configurations?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358378#M174793</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-05-04T15:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358379#M174794</link>
      <description>&lt;P&gt;Hi romeo, any internal error regarding bad recognition timestamp or something similar ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358379#M174794</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2017-05-04T15:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358380#M174795</link>
      <description>&lt;P&gt;Yes with the Add data function in GUI the time is extracted correctly with default and the sourcetype of flat_file!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 00:05:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358380#M174795</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-05T00:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358381#M174796</link>
      <description>&lt;P&gt;@somesoni2, @woodcock, @jkat54, any ideas on this one?&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 00:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358381#M174796</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-05T00:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358382#M174797</link>
      <description>&lt;P&gt;What happens if you don't specify the TIME_FORMAT?&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 00:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358382#M174797</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-05-05T00:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358383#M174798</link>
      <description>&lt;P&gt;No internal errors for these logs!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 01:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358383#M174798</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-05T01:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358384#M174799</link>
      <description>&lt;P&gt;I have tried this, no difference!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 06:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358384#M174799</guid>
      <dc:creator>romeoszakal</dc:creator>
      <dc:date>2017-05-05T06:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp set to Midnight</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358385#M174800</link>
      <description>&lt;P&gt;Is this happening on a standalone server ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 13:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timestamp-set-to-Midnight/m-p/358385#M174800</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2017-05-05T13:00:53Z</dc:date>
    </item>
  </channel>
</rss>

