<?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: input.conf path has numbers how do i capture this? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123855#M33462</link>
    <description>&lt;P&gt;Use regex under stanza&lt;/P&gt;

&lt;P&gt;[monitor:///var/www/webapp/logs]&lt;BR /&gt;
whitelist=\/var\/www\/webapp\/application\/logs\/\d{4}\/\d{2}\/\d{2}.log&lt;/P&gt;

&lt;P&gt;Please change regex if it does not work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Sep 2014 10:09:23 GMT</pubDate>
    <dc:creator>kml_uvce</dc:creator>
    <dc:date>2014-09-14T10:09:23Z</dc:date>
    <item>
      <title>input.conf path has numbers how do i capture this?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123852#M33459</link>
      <description>&lt;P&gt;our log path looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/var/www/webapp/application/logs/2014/09/13/03.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where 2014 is the year, 09 is the month, 13 is the day, and 03 is the hour.&lt;/P&gt;

&lt;P&gt;How can i capture this path pattern in input.conf so all auto generated starting with the year, month, day, hour are captured and the logs are sent to splunkstorm index?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Sep 2014 08:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123852#M33459</guid>
      <dc:creator>zergid</dc:creator>
      <dc:date>2014-09-13T08:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: input.conf path has numbers how do i capture this?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123853#M33460</link>
      <description>&lt;P&gt;have you looked at the wildcard characters? Either of the following should work - take a look at the docs for inputs.conf in the Search Reference manual.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor:///var/www/webapp/logs/.../*.log]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;[monitor:///var/www/webapp/logs/2014/*/*/*.log]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Sep 2014 11:49:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123853#M33460</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-09-13T11:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: input.conf path has numbers how do i capture this?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123854#M33461</link>
      <description>&lt;P&gt;EDIT: I may have misunderstood your goal, and perahaps the other answer is the one you want.&lt;BR /&gt;
If you just want to index those files, a wildcards or regex whitelist will do the job.&lt;/P&gt;

&lt;P&gt;If you want to find out the times from the path, the rest of my answer is relevant.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Splunk will attempt to guess the date from the filename first by TIME_FORMAT and then falling back to regexes as an initial seed/guess value before running the time extraction per-event logic.  In other words the filename can influence timestamping.&lt;/P&gt;

&lt;P&gt;However, I'm unclear whether the full path is passed into this logic.  I think it is not.&lt;/P&gt;

&lt;P&gt;The remaining options are:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;ensure the modtime is accurate.  Splunk will use the modtime as a guide for the data, so the pathname may be unnecessary.&lt;/LI&gt;
&lt;LI&gt;Put the date into the filename so that the filename logic can work&lt;/LI&gt;
&lt;LI&gt;Put timestamps in the file &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Timestamps in the file is definitely the best outcome, but it might not be an availble choice to you.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2014 01:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123854#M33461</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2014-09-14T01:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: input.conf path has numbers how do i capture this?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123855#M33462</link>
      <description>&lt;P&gt;Use regex under stanza&lt;/P&gt;

&lt;P&gt;[monitor:///var/www/webapp/logs]&lt;BR /&gt;
whitelist=\/var\/www\/webapp\/application\/logs\/\d{4}\/\d{2}\/\d{2}.log&lt;/P&gt;

&lt;P&gt;Please change regex if it does not work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2014 10:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123855#M33462</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2014-09-14T10:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: input.conf path has numbers how do i capture this?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123856#M33463</link>
      <description>&lt;P&gt;This will definitely limit the stanza to only match filenames like that (though I recommend anchoring the regex with ^ and $, but it won't make the numbers available elsewhere.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 00:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/input-conf-path-has-numbers-how-do-i-capture-this/m-p/123856#M33463</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2014-09-15T00:18:04Z</dc:date>
    </item>
  </channel>
</rss>

