Getting Data In

How can we monitor all log files in current directory and sub-directories?

ddrillic
Ultra Champion

We wonder whether [monitor:///<source>/logs/*.log] would monitor all log files in the <source>/logs directory and also in sub-directories under <source>/logs, such as <source>/logs/2016121404.

We wonder whether [monitor:///<source>/logs/.../*.log] would get the data from both areas...

0 Karma
1 Solution

lguinn2
Legend

If you want to monitor all logs in the /source/logs directory, you can simply do this

[monitor:///source/logs/]
whitelist=\.log$

I think that is the cleanest and easiest to understand. But this should do the same thing

[monitor:///source/logs/.../*.log]

In either case, Splunk will walk the entire directory tree, starting from /source/logs, and index any file it finds where the file path ends in ".log"

View solution in original post

lguinn2
Legend

If you want to monitor all logs in the /source/logs directory, you can simply do this

[monitor:///source/logs/]
whitelist=\.log$

I think that is the cleanest and easiest to understand. But this should do the same thing

[monitor:///source/logs/.../*.log]

In either case, Splunk will walk the entire directory tree, starting from /source/logs, and index any file it finds where the file path ends in ".log"

ddrillic
Ultra Champion

Gorgeous!!

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