Splunk Search

log file rotation

rupesh212121
Explorer

When splunk is watching a directory for log files will it reindex a file that gets rotated? I am trying to make sure that some of my logs are not getting indexed twice.

Example:

file1.log gets changed to file1.log12212010 service creates new file1.log and continues logging

where can i save the rotated log file or does splunk have any facility to save the rotated logs. please answer. thank u rupesh.

Tags (1)
0 Karma

Ayn
Legend

No, Splunk has a number of ways of recognizing the file's content other than the actual filename so it will not reindex a file just because the name changed.

As for the second question I'm not sure what you mean - Splunk itself has no functionality (to my knowledge) for rotating, moving or otherwise modify the log files. All it does is index the data contained in the log files to its own database.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...