<?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: Handle log rolling and index yesterday's log file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740961#M117783</link>
    <description>&lt;P&gt;You simply can't. A regex matches a pattern. The pattern is static. It can contain some "recursive" elements but you can't put something like "today's date" as part of the pattern.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2025 19:52:09 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-03-05T19:52:09Z</dc:date>
    <item>
      <title>Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740743#M117749</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;we have a scenario where we roll logs everyday. we want Splunk to index log file for yesterday only. We don't want to ingest todays log files. what specific setting d i require in&amp;nbsp; my input. Conf file to only ingest yesterdays data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;ignoreOlderThan = 1d&amp;nbsp; also ingests todays logfiles which i do not want to.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Mar 2025 11:34:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740743#M117749</guid>
      <dc:creator>shabamichae</dc:creator>
      <dc:date>2025-03-04T11:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740755#M117750</link>
      <description>&lt;P&gt;I think I'd try to simply use logrotate or some custom script to move the log from yesterday to another directory from which they would normally be ingested&amp;nbsp; with monitor input.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 12:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740755#M117750</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-04T12:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740765#M117753</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239337"&gt;@shabamichae&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do your monitor stanzas currently look like for monitoring these files? Do the logs roll to a "logName.log.1" format (.1 being yesterday)?&lt;/P&gt;&lt;P&gt;If so. you may be able to update your existing monitor stanzas to add a whitelist (see&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.4.0/Data/Monitorfilesanddirectorieswithinputs.conf#:~:text=whitelist%20%3D%20%3Cregular%20expression%3E" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.4.0/Data/Monitorfilesanddirectorieswithinputs.conf#:~:text=whitelist%20%3D%20%3Cregular%20expression%3E&lt;/A&gt;)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;whitelist = &amp;lt;regular expression&amp;gt;	If set, the Splunk platform monitors files whose names match the specified regular expression.	

## inputs.conf ##
[monitor:///var/log/*]
index=syslog
sourcetype=example
..etc..
whitelist = .*\.1$&lt;/LI-CODE&gt;&lt;P&gt;Also check out&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Specifyinputpathswithwildcards" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Specifyinputpathswithwildcards&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:00:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740765#M117753</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-04T14:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740820#M117760</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for your response,&amp;nbsp;&lt;SPAN&gt;below is a sample log file names&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;server.log.20250303.1&lt;BR /&gt;server.log.20250303.10&lt;BR /&gt;server.log.20250303.11&lt;BR /&gt;server.log.20250303.12&lt;BR /&gt;server.log.20250303.13&lt;BR /&gt;server.log.20250303.14&lt;BR /&gt;server.log.20250303.15&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 12:21:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740820#M117760</guid>
      <dc:creator>shabamichae</dc:creator>
      <dc:date>2025-03-05T12:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740918#M117773</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Yes i do understand would require some kind of regex , but My issue is how do i wrrite the regex&amp;nbsp; to match the date , do i need to configure a dat.xml file to read the current date&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;server.log.20250303.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.11&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.12&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.13&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.14&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;server.log.20250303.15&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 12:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740918#M117773</guid>
      <dc:creator>shabamichae</dc:creator>
      <dc:date>2025-03-05T12:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Handle log rolling and index yesterday's log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740961#M117783</link>
      <description>&lt;P&gt;You simply can't. A regex matches a pattern. The pattern is static. It can contain some "recursive" elements but you can't put something like "today's date" as part of the pattern.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 19:52:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handle-log-rolling-and-index-yesterday-s-log-file/m-p/740961#M117783</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-05T19:52:09Z</dc:date>
    </item>
  </channel>
</rss>

