<?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: How can I get date from filename and time from inside logs. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268871#M51612</link>
    <description>&lt;P&gt;Hi Badri, &lt;/P&gt;

&lt;P&gt;I'd seen this topic and I followed all the steps but I didn't had success.&lt;BR /&gt;
I am trying with Splunk 6.3 in Windows and Linux too. &lt;/P&gt;

&lt;P&gt;Regards, &lt;/P&gt;</description>
    <pubDate>Sun, 11 Oct 2015 16:08:10 GMT</pubDate>
    <dc:creator>dfigurello</dc:creator>
    <dc:date>2015-10-11T16:08:10Z</dc:date>
    <item>
      <title>How can I get date from filename and time from inside logs.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268868#M51609</link>
      <description>&lt;P&gt;Hi Splunkers, &lt;/P&gt;

&lt;P&gt;How can I get date from filename and time from inside the logs. &lt;BR /&gt;
For example:&lt;/P&gt;

&lt;P&gt;I have a file named  LOG_09-10-2015.TXT and inside the log it contains something like:&lt;/P&gt;

&lt;P&gt;23450001 value value value value&lt;BR /&gt;
23450001 value value value value&lt;/P&gt;

&lt;P&gt;I'd like to get the date from filename "09-10-15" and the time from file "23:45:00.01".&lt;/P&gt;

&lt;P&gt;I tried many configurations but I didn't had suscess. &lt;/P&gt;

&lt;P&gt;I changed the configuration at datetime.xml: &lt;BR /&gt;
I put in &lt;CODE&gt;"C:\Program Files\Splunk\etc\apps\search\local"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&amp;lt;define name="_masheddate3" extract="day, month, year"&amp;gt;&lt;BR /&gt;
&amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:^|source:).*?\d[0-9]-\d[0-9]-\d[0-9]]]&amp;gt;&amp;lt;/text&amp;gt;&lt;/P&gt;

&lt;P&gt;(...)&lt;/P&gt;

&lt;P&gt;&amp;lt;use name="_masheddate3"/&amp;gt;&lt;/P&gt;

&lt;P&gt;My props.conf is: &lt;/P&gt;

&lt;P&gt;[logs_test]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG=C:\Program Files\Splunk\etc\apps\search\local\datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if you guys need more information, &lt;/P&gt;

&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 21:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268868#M51609</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2015-10-09T21:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get date from filename and time from inside logs.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268869#M51610</link>
      <description>&lt;P&gt;hmm, this is a good one heh&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2015 01:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268869#M51610</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2015-10-10T01:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get date from filename and time from inside logs.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268870#M51611</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you take a look into the below article .&lt;/P&gt;

&lt;P&gt;&lt;A href="http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/"&gt;http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Badri&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2015 12:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268870#M51611</guid>
      <dc:creator>badrinath_itrs</dc:creator>
      <dc:date>2015-10-11T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get date from filename and time from inside logs.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268871#M51612</link>
      <description>&lt;P&gt;Hi Badri, &lt;/P&gt;

&lt;P&gt;I'd seen this topic and I followed all the steps but I didn't had success.&lt;BR /&gt;
I am trying with Splunk 6.3 in Windows and Linux too. &lt;/P&gt;

&lt;P&gt;Regards, &lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2015 16:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-date-from-filename-and-time-from-inside-logs/m-p/268871#M51612</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2015-10-11T16:08:10Z</dc:date>
    </item>
  </channel>
</rss>

