<?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 Log file rotation with date in file name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78386#M181630</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have to get all (and ONLY) tomcat std out files in D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs. I have the following name of tomcat std out file tomcat6-stdout.2013-01-03.log - and it changes everyday. How do I monitor these files continuosly&lt;/P&gt;

&lt;P&gt;My inputs.conf has the stanza below. &lt;BR /&gt;
[monitor://D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs/tomcat6-stdout*] &lt;BR /&gt;
disabled = false &lt;BR /&gt;
followTail = 0 &lt;BR /&gt;
sourcetype = w_std_log_dynamic&lt;/P&gt;

&lt;P&gt;I suspect the problem is with log file rotation as if a new tomcat6-stdout with today's date is getting generated, it is not being indexed (not shown in the sources list in the search app).&lt;/P&gt;

&lt;P&gt;Thanks and any pointers would be of great help.&lt;/P&gt;

&lt;P&gt;Kindly help&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:03:01 GMT</pubDate>
    <dc:creator>1234testtest</dc:creator>
    <dc:date>2020-09-28T13:03:01Z</dc:date>
    <item>
      <title>Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78386#M181630</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have to get all (and ONLY) tomcat std out files in D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs. I have the following name of tomcat std out file tomcat6-stdout.2013-01-03.log - and it changes everyday. How do I monitor these files continuosly&lt;/P&gt;

&lt;P&gt;My inputs.conf has the stanza below. &lt;BR /&gt;
[monitor://D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs/tomcat6-stdout*] &lt;BR /&gt;
disabled = false &lt;BR /&gt;
followTail = 0 &lt;BR /&gt;
sourcetype = w_std_log_dynamic&lt;/P&gt;

&lt;P&gt;I suspect the problem is with log file rotation as if a new tomcat6-stdout with today's date is getting generated, it is not being indexed (not shown in the sources list in the search app).&lt;/P&gt;

&lt;P&gt;Thanks and any pointers would be of great help.&lt;/P&gt;

&lt;P&gt;Kindly help&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78386#M181630</guid>
      <dc:creator>1234testtest</dc:creator>
      <dc:date>2020-09-28T13:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78387#M181631</link>
      <description>&lt;P&gt;You could try using a whitelist for the folder. The * in the stanza relates to path, so your monitor was looking for &lt;STRONG&gt;folders&lt;/STRONG&gt; instead of files that match the regex.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor://D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
followTail = 0&lt;BR /&gt;
sourcetype=w_std_log_dynamic&lt;BR /&gt;
whitelist = tomcat6-stdout.*\.log&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 14:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78387#M181631</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-01-04T14:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78388#M181632</link>
      <description>&lt;P&gt;How about adding ".log" to the end. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs/tomcat6-stdout*.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is then exactly like in examples in Splunk docs (=should work)&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Specifyinputpathswithwildcards"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Specifyinputpathswithwildcards&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ps. I'm not sure if it makes difference but have you tried turning your "/" to "\" if it is Windows?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 14:20:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78388#M181632</guid>
      <dc:creator>kallu</dc:creator>
      <dc:date>2013-01-04T14:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78389#M181633</link>
      <description>&lt;P&gt;The primary reason for not doing it that way is that the assumption was that this was a Windows system "D:" and the documentation states that that will not work on Windows.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Warning: In Windows, you cannot currently use a wildcard at the root level. For example, this does not work:&lt;BR /&gt;
[monitor://E:\...\foo\*.log]&lt;BR /&gt;
Splunk logs an error and fails to index the desired files.&lt;BR /&gt;
This is a known issue, described in the Known Issues topic of the Release Notes. Look there (http://docs.splunk.com/Documentation/Splunk/5.0.1/ReleaseNotes/KnownIssues) for details on all known issues.&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 14:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78389#M181633</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-01-04T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78390#M181634</link>
      <description>&lt;P&gt;Thank you. surprisingly after a restart of splunk server - this worked -&lt;/P&gt;

&lt;P&gt;[monitor://D:\Program Files\Apache Software Foundation\Tomcat 6.0\logs\tomcat6-stdout*]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
followTail = 0&lt;BR /&gt;
sourcetype = w_std_log_dynamic&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:03:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78390#M181634</guid>
      <dc:creator>1234testtest</dc:creator>
      <dc:date>2020-09-28T13:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Log file rotation with date in file name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78391#M181635</link>
      <description>&lt;P&gt;This worked for me also.  There are many different sourcetypes in this directory, so for this particular sourcetype with the date in the file name is easier to manage as a source with a wildcard than with a whitelist for a directory - I need all files from the directory, but with different sourcetypes.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2016 16:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Log-file-rotation-with-date-in-file-name/m-p/78391#M181635</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-08-27T16:19:56Z</dc:date>
    </item>
  </channel>
</rss>

