Monitoring Splunk

Disable monitoring of sub directories

Josh
Path Finder

Hello

How can I monitor the files within a directory but ignore its subdirectories?

e.g. I want to monitor all files in c:\mydir

However mydir contains a folder called temp how can I configure my inputs.conf file so that the files in the folder temp are not monitored.

I know I can use a blacklist for temp, however lets say mydir contains numorous other directories is there a way to just blacklist all directories within mydir?

Ta, Josh

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You can use the blacklist:

_blacklist = (?i)^c:\\mydir\\[^\\]+\\

View solution in original post

jrodman
Splunk Employee
Splunk Employee

You can also use a wildcard to only include immediate files within the directory.

[monitor://c:\mydir\*]

gkanapathy
Splunk Employee
Splunk Employee

You can use the blacklist:

_blacklist = (?i)^c:\\mydir\\[^\\]+\\
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...