<?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: Logs with no timestamp incorrectly getting date from file name in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48278#M9131</link>
    <description>&lt;P&gt;Thanks, but what I'd like to do is use the timestamp from the log entry plus the modification date of the file to form the timestamp for the event. Is there a way to do that?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2011 13:54:11 GMT</pubDate>
    <dc:creator>gpullis</dc:creator>
    <dc:date>2011-07-26T13:54:11Z</dc:date>
    <item>
      <title>Logs with no timestamp incorrectly getting date from file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48276#M9129</link>
      <description>&lt;P&gt;I have a sourcetype where Splunk is correctly getting the time stamp from the events, but the events don't contain a date.&lt;/P&gt;

&lt;P&gt;Unfortunately the logs are named like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;rkj050508_d0373452.broomecounty.us.tracesql&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Where &lt;CODE&gt;050508&lt;/CODE&gt; is part of a username, and not a date. But, sure enough, Splunk thinks the events are from 2008-05-05.&lt;/P&gt;

&lt;P&gt;Is there a way to get the date from index-time, but get the time from the timestamp?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2011 20:10:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48276#M9129</guid>
      <dc:creator>gpullis</dc:creator>
      <dc:date>2011-07-25T20:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Logs with no timestamp incorrectly getting date from file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48277#M9130</link>
      <description>&lt;P&gt;I would suggest using &lt;CODE&gt;DATETIME_CONFIG = current&lt;/CODE&gt; in props.conf for the sourcetype the data is assigned. I think it has a decent chance at telling splunk to use the system current timestamp for the event. You can also try to specify a TIME_FORMAT, TIME_PREFIX, and MAX_TIMESTAMP_LOOKAHEAD in props.conf to tell splunk what the time format is, where to look for the timestamp, and how many characters the timestamp contains. If there isn't a date in the file, just don't specify one. The default behavior is that when the log doesn't contain a date, to revert to the mod time of the file for the date. Hopefully this will get you close to what you'd like to see. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/Data/Configuretimestamprecognition" target="_blank"&gt;http://www.splunk.com/base/Documentation/latest/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48277#M9130</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2020-09-28T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Logs with no timestamp incorrectly getting date from file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48278#M9131</link>
      <description>&lt;P&gt;Thanks, but what I'd like to do is use the timestamp from the log entry plus the modification date of the file to form the timestamp for the event. Is there a way to do that?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2011 13:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48278#M9131</guid>
      <dc:creator>gpullis</dc:creator>
      <dc:date>2011-07-26T13:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logs with no timestamp incorrectly getting date from file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48279#M9132</link>
      <description>&lt;P&gt;I edited my answer to reflect what I would suggest given this information.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2011 18:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48279#M9132</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-07-26T18:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Logs with no timestamp incorrectly getting date from file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48280#M9133</link>
      <description>&lt;P&gt;Actually, the default behavior appears to be to look for a date in the filename if it can't find a date in the event.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2011 00:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-with-no-timestamp-incorrectly-getting-date-from-file-name/m-p/48280#M9133</guid>
      <dc:creator>gpullis</dc:creator>
      <dc:date>2011-08-07T00:53:49Z</dc:date>
    </item>
  </channel>
</rss>

