<?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: getting event timestamp from source file name in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14304#M1453</link>
    <description>&lt;P&gt;is splunk not automatically getting the timestamp from the filename? what is being used instead?&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2010 01:53:36 GMT</pubDate>
    <dc:creator>piebob</dc:creator>
    <dc:date>2010-05-27T01:53:36Z</dc:date>
    <item>
      <title>getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14303#M1452</link>
      <description>&lt;P&gt;I have a .csv file that I'm indexing.  There is no timestamp information in the .csv file, but there is a date in the file name itself.   How can I tell splunk to use the date in the SOURCE as the timestamp for each event in the file?&lt;/P&gt;

&lt;P&gt;Ex filenames:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MY_FILE-2010-05-25.csv
MY_FILE-2010-05-26.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 May 2010 00:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14303#M1452</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2010-05-27T00:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14304#M1453</link>
      <description>&lt;P&gt;is splunk not automatically getting the timestamp from the filename? what is being used instead?&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 01:53:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14304#M1453</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2010-05-27T01:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14305#M1454</link>
      <description>&lt;P&gt;This should be done automatically.&lt;/P&gt;

&lt;P&gt;You can get more info about a custom setup on this blog entry:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/" rel="nofollow"&gt;http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;However, this is a pretty popular date format, so you shouldn't need a custom setup.  This date should match the &lt;CODE&gt;_isodate&lt;/CODE&gt; named format.  (As seen in the default &lt;CODE&gt;datetime.xml&lt;/CODE&gt; file.)&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 02:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14305#M1454</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-27T02:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14306#M1455</link>
      <description>&lt;P&gt;To make sure it gets the date from the file name, configure you TIME_PREFIX, TIME_FORMAT, and MAX_TIMESTAMP_LOOKAHEAD so that there is no possibility that it will find a date elsewhere in your event text. (Splunk is somewhat aggressive about this if you leave it on its own.) Once it fails there, it will find its way to finding the date in the file name.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14306#M1455</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2020-09-28T09:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14307#M1456</link>
      <description>&lt;P&gt;I updated my props.conf to have TIME_PREFIX=FILE-   TIME_FORMAT=%Y-%m-%d   MAX_TIMESTAMP_LOOKAHEAD=20 and SPLUNK used the modified date of the file as the timestamp. (not the date in the filename).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14307#M1456</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2020-09-28T09:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: getting event timestamp from source file name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14308#M1457</link>
      <description>&lt;P&gt;it's using the modification time of the file.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 21:16:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/getting-event-timestamp-from-source-file-name/m-p/14308#M1457</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2010-05-27T21:16:53Z</dc:date>
    </item>
  </channel>
</rss>

