Splunk Dev

Monitoring log files reused in a ring?

sowings
Splunk Employee
Splunk Employee

I have a log source which re-uses the same log file based upon the day of the month. A filename contains other information, but that information doesn't change. Here is a sample: 10_40809_(IRL_Lab_Live).log. That filename represents log data written on the 10th of October. Next month, it will be truncated, starting again from an empty file, but still the same filename. I've got a standard [monitor:...] style inputs.conf stanza monitoring the directory containing these files.

It seems that I have to occasionally jiggle Splunk's elbow (restart) to get it to index "today's" data. Is there some other trick to get Splunk to index this smoothly? It doesn't sound like a candidate for alwaysOpenFile, but I could try that setting if it would help.

Tags (2)
1 Solution

ShaneNewman
Motivator

I discovered that if we removed the ignoreOlderThan filter on the inputs and just ate the bullet on indexing all of that data that it will work fine. For whatever reason I guess that the filter was looking at the original file time?

View solution in original post

0 Karma

ShaneNewman
Motivator

I discovered that if we removed the ignoreOlderThan filter on the inputs and just ate the bullet on indexing all of that data that it will work fine. For whatever reason I guess that the filter was looking at the original file time?

0 Karma

sowings
Splunk Employee
Splunk Employee

Possible. Windows log sources are ... notorious for not updating the modtime of the file. It's seen a lot in IIS installations.

Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...