Getting Data In

Under what situation would one monitor a rolled log file?

the_wolverine
Champion

I've heard that Splunk recommends monitoring of rolled log files (eg. file.log.1, file.log.2, etc) under certain situations. What are those situations?

I would think that monitoring of file.log would be sufficient.

0 Karma

yannK
Splunk Employee
Splunk Employee

It is all about the last events recorded before the log rotated. If this is too quick, the tailing processor may have read them.
So the recommended behavior (when not using crcSalt) is to monitor the first rotated files.

Otherwise, the behavior will depend of the OS and of the type of rotation.

  • By example on linux logrotate a log file usually move to the new version (file.log -> file.log.1), so Splunk will keep monitoring the handle on the file and get the last events.
  • If the file is copied and the original deleted, then the events will not be read from the new file.
0 Karma

kristian_kolb
Ultra Champion

I'd assume that file.log.1 does not get updated - so a single pass through that file should find any events that were written just before the file was rotated. Thus there would be no real need to monitor .2 or .3 etc

0 Karma

the_wolverine
Champion
  • How does one determine if log rotate is too quick?
  • So Splunk does not recommend monitoring file.log.2, file.log.3, etc?
  • What is the recommended syntax for monitor input in this case?
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...