Getting Data In

need help setting up a blacklist

balbano
Contributor

Hi guys,

Trying to make a custom blacklist for one of my input monitor points that excludes certain directories and filetypes (gz).

This is when I have so far:

inputs.conf

[default]

host = myhost

[monitor:///my_monitor_point]

disabled = false

blacklist = (subfolder1|subfolder2|subfolder3|subfolder4|\.gz$|\.\d+$)


index = my_index


sourcetype = my_source_type

Can someone confirm if this is the correct way to do this?

Thanks.

Brian

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

yes, the above will work. However, it's probably unnecessary to specify the host as it will be inherited or derived from the local machine name, unless you need it to be different. If you do, it may make sense to specify it under the [monitor] stanza rather than [default], but really it depends on the rest of your usage.

Note that your blacklist might be too broad, e.g., if one of your subfolders is called "bin", then you will also exclude any file named "binary.log" as well as everything in a directory named "bingo". You'd need to make your regex more specific if you want to avoid that happening.

View solution in original post

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

yes, the above will work. However, it's probably unnecessary to specify the host as it will be inherited or derived from the local machine name, unless you need it to be different. If you do, it may make sense to specify it under the [monitor] stanza rather than [default], but really it depends on the rest of your usage.

Note that your blacklist might be too broad, e.g., if one of your subfolders is called "bin", then you will also exclude any file named "binary.log" as well as everything in a directory named "bingo". You'd need to make your regex more specific if you want to avoid that happening.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...