Getting Data In

Reindex linux log file

TheBravoSierra
Path Finder

I need to index a file: /var/log/file.txt. This file runs every day, but sometimes the content doesn't change. This leaves me with no events on days that remain the same. I need it to index every time the timestamp changes on the file. I believe I need to add crcSalt =<SOURCE> to the inputs.conf in order to reindex it. However, my inputs monitors all files in /var/log. So if I add that to that input monitor, it would likely apply to all files in var log reindexing them all every time. Something I don't want. How can I reindex just this file daily while leaving the other files in the directory unchanged? 

Many thanks

Labels (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Create a separate inputs.conf stanza for /var/log/file.txt with crcSalt. Then blacklist file.txt from original /var/log monitoring stanza.

View solution in original post

somesoni2
Revered Legend

Create a separate inputs.conf stanza for /var/log/file.txt with crcSalt. Then blacklist file.txt from original /var/log monitoring stanza.

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 ...