Security

How to blacklist events from monitored logs

andrei1bc
Communicator

I have 3 different event types :

2017-02-08T08:55:32,704 [host;app1;http-bio-8115-exec-5;[[xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx] (git:stuff) text                                                       WARN  -  message1
2017-02-08T08:55:30,262 [host;app2; Pitt][generic][T#1];[[xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx] (git:stuff) text                                              WARN  -  message2
2017-02-08T08:55:29,227 [host;app3;AsyncTaskExecutor-10;[[xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx] (git:stuff) text                                                        WARN  -  message3

inputs.conf contains

[monitor:///log/*.log]
disabled = false
sourcetype = log4j
blacklist = /\S[WARN]/g

Events still get indexed. Please help with some direction.

Thank you in advance.

Tags (1)
0 Karma
1 Solution

davebrooking
Contributor

The blacklist attribute in a monitor stanza acts against files within the path and not individual events within a file. The inputs.conf documentation states

blacklist =
* If set, files from this input are NOT monitored if their path matches the specified regex.

To filter at the event level for a file monitor you can add settings to the props.conf and transforms.conf. It's documented here

Dave

View solution in original post

davebrooking
Contributor

The blacklist attribute in a monitor stanza acts against files within the path and not individual events within a file. The inputs.conf documentation states

blacklist =
* If set, files from this input are NOT monitored if their path matches the specified regex.

To filter at the event level for a file monitor you can add settings to the props.conf and transforms.conf. It's documented here

Dave

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...