<?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 Date stamp in directory name in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Date-stamp-in-directory-name/m-p/52285#M96812</link>
    <description>&lt;P&gt;How can I configure splunk to index or accept the datestamp in the name of directories?&lt;BR /&gt;
The events only have time stamps.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;drwxr-xr-x 2 test test 57344 May 13 03:35 20120513
drwxr-xr-x 2 test test 57344 May 14 21:21 20120514
drwxr-xr-x 2 test test 57344 May 15 18:31 20120515
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm having issues when I restart the forwarder and it doesn't recognize the date time in the meta data.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2012 18:33:14 GMT</pubDate>
    <dc:creator>suhprano</dc:creator>
    <dc:date>2012-05-15T18:33:14Z</dc:date>
    <item>
      <title>Date stamp in directory name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Date-stamp-in-directory-name/m-p/52285#M96812</link>
      <description>&lt;P&gt;How can I configure splunk to index or accept the datestamp in the name of directories?&lt;BR /&gt;
The events only have time stamps.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;drwxr-xr-x 2 test test 57344 May 13 03:35 20120513
drwxr-xr-x 2 test test 57344 May 14 21:21 20120514
drwxr-xr-x 2 test test 57344 May 15 18:31 20120515
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm having issues when I restart the forwarder and it doesn't recognize the date time in the meta data.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 18:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Date-stamp-in-directory-name/m-p/52285#M96812</guid>
      <dc:creator>suhprano</dc:creator>
      <dc:date>2012-05-15T18:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date stamp in directory name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Date-stamp-in-directory-name/m-p/52286#M96813</link>
      <description>&lt;P&gt;I am assuming that you are getting the date from the directory but the time from the events.  You do it like this:&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/etc/apps/myApp/default/props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = /etc/apps/myApp/default/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;$SPLUNK_HOME/etc/apps/myApp/default/datetime.xml&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
&amp;lt;define name="file4date" extract="year, month, day"&amp;gt;
   &amp;lt;text&amp;gt;&amp;lt;![CDATA[source::.*?/(\d{4})(\d{2})(\d{2})/]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;
&amp;lt;define name="event4time" extract="hour, minute, seconds"&amp;gt;
   &amp;lt;!--This assumes that every event starts like this: "HH:MM:SS"  You must change to fit your data!!!--&amp;gt;
   &amp;lt;text&amp;gt;&amp;lt;![CDATA[^(\d{2}):(\d{2}):(\d{2})]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;
&amp;lt;timePatterns&amp;gt;
   &amp;lt;use name="event4time"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;
&amp;lt;datePatterns&amp;gt;
   &amp;lt;use name="file4date"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jul 2015 14:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Date-stamp-in-directory-name/m-p/52286#M96813</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-06T14:06:18Z</dc:date>
    </item>
  </channel>
</rss>

