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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...