Getting Data In

Blacklisting is not working

Prakash493
Communicator

Hi , I am monitoring a file path , i am ingesting the logs also i am blacklisting some folders in the directory which is working and i am trying to add one more blacklisting path but its not working , what i am doing wrong here ?

[monitor://\xxxx\Logs\Prod...*.log]
blacklist = TaskAudit|webmanager|web_S*.log||enterpriseSecurity*.log|(\\SXXXXX\Logs\Prod\PlatformServices)

i wanna blacklist the last one platform services log but cant able to do it , tried to add a regex but nothing working.

0 Karma
1 Solution

bandit
Motivator

Looks like you have two pipes in the middle || - not sure if Splunk will just ignore that or if it will cause issues.

blacklist = TaskAudit|webmanager|web_S*.log|enterpriseSecurity*.log|PlatformServices$

As a strategy, I rarely use whitelists or blacklists unless absolutely necessary. Usually it is more work to configure, and often results in Splunk working harder to scan the directories/files it's trying to monitor. I would first attempt to use the implicit whitelist in your monitoring stanza even if you have to create 2 or 3. It also makes it simple to test with a simple dir command on Windows or ls command on Unix in most cases.

i.e.

[monitor://\\xxxx\Logs\Prod_something_more_specific_here*.log]

View solution in original post

bandit
Motivator

Looks like you have two pipes in the middle || - not sure if Splunk will just ignore that or if it will cause issues.

blacklist = TaskAudit|webmanager|web_S*.log|enterpriseSecurity*.log|PlatformServices$

As a strategy, I rarely use whitelists or blacklists unless absolutely necessary. Usually it is more work to configure, and often results in Splunk working harder to scan the directories/files it's trying to monitor. I would first attempt to use the implicit whitelist in your monitoring stanza even if you have to create 2 or 3. It also makes it simple to test with a simple dir command on Windows or ls command on Unix in most cases.

i.e.

[monitor://\\xxxx\Logs\Prod_something_more_specific_here*.log]

Prakash493
Communicator

yes its works thanks its because of two pipes i tried with a single pipe and got worked.

0 Karma

bandit
Motivator

Would help if you have an actual directory listing.

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