Getting Data In

How do you monitor certain files in the directory using whitelist?

mlevsh
Builder

Hi,

We have numerous files in the directory we want to monitor: different types logs files and their snapshots.

For example:

audit.log
audit.log.2018-05-21.log
audit.log.2018-05-20.log
server.log
server.log.1
server.log.2

We need to continuously monitor only audit.log and server.log logs.

This data input doesn't seem to work. Dated audit.log* were ingested as well.

[monitor://E:\dir\subdir1\subdir2\subdir3\log]
disabled = false
index = indexname
sourcetype = sourcename
followTail = 0 
whitelist = audit.log$|server.log$

Any advice on how would you do it?

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi mlevsh,
you could try something like this:

 [monitor://E:\dir\subdir1\subdir2\subdir3\log\audit.log]
 disabled = false
 index = indexname
 sourcetype = sourcename
 followTail = 0 

 [monitor://E:\dir\subdir1\subdir2\subdir3\log\audit.log\server.log]
 disabled = false
 index = indexname
 sourcetype = sourcename
 followTail = 0 

Bye.
Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi mlevsh,
you could try something like this:

 [monitor://E:\dir\subdir1\subdir2\subdir3\log\audit.log]
 disabled = false
 index = indexname
 sourcetype = sourcename
 followTail = 0 

 [monitor://E:\dir\subdir1\subdir2\subdir3\log\audit.log\server.log]
 disabled = false
 index = indexname
 sourcetype = sourcename
 followTail = 0 

Bye.
Giuseppe

mlevsh
Builder

@cusello , that was one of the options. I was looking for more elegant solution , maybe 🙂

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...