Getting Data In

How do I blacklist multiple events on same line: Can I use '-'?

benbabich
Explorer

I want to blacklist 4698, 4699, 4700, 4701,4702 if they contain 'Microsoft\Windows' in the Task Name.

Would either of these work?
blacklist1 = EventCode="4698,4699,4700,4701,4702" Message="(?:Task Name:).+(?:Microsoft\Windows?)"
or
blacklist1 = EventCode="4698-4702" Message="(?:Task Name:).+(?:Microsoft\Windows?)"

Or would I have to have a separate line for each, such as :
blacklist1 = EventCode="4698" Message="(?:Task Name:).+(?:Microsoft\Windows?)"
blacklist2 = EventCode="4699" Message="(?:Task Name:).+(?:Microsoft\Windows?)"
etc

0 Karma

chanthongphiob
Path Finder

Since Message="(?:Task Name:).+(?:Microsoft\Windows?)" is in regex form, the "EventCode=" must use regex as well.

You will have to break up "EventCode=" into two separate blacklist. For example:

blacklist = EventCode="^469([8-9])$" Message=blah
blacklist1 = EventCode="^470([0-2])$" Message=blah

This Splunk Doc provides an example of whitelisting, but both are similar.

http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Data/MonitorWindowseventlogdata

0 Karma

aivarson_splunk
Splunk Employee
Splunk Employee

You can either filter by eventcode or regex. According to Splunk Docs...You can specify one of two formats:

One or more Event Log event codes or event IDs (Event Log code/ID format.)
One or more sets of keys and regular expressions. (Advanced filtering format.)
You cannot mix formats in a single entry. You also cannot mix formats in the same stanza.

Examples -
event code blacklist
blacklist1 = 1100,1101,4624,4634,4647-4649

regex blacklist
blacklist1 = EventCode=%^200$% User=%drodman%

You can specify up to 10 blacklist per input stanza. If you need more than this you might want to consider a whitelist strategy instead. You just whitelist the codes you need instead of blacklisting the ones you don't.

More details here: http://docs.splunk.com/Documentation/Splunk/latest/admin/inputsconf#Event_Log_whitelist_and_blacklis...

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...