Splunk Search

Need to omit events with specific strings (info or debug) in them.

Arpit_S
Path Finder

I am trying to prevent debug and info events from getting logged into splunk. I created an inputs.conf and used blacklist statement to blacklist these events, but it didn't help.

I wrote below stanza in inputs.conf using regex, but no luck.

blacklist = .:\s+[(debug|\sinfo)|.

Can i directly do blacklisting in inputs.conf using the below statements?
blacklist1 = debug
blacklist2 = info

If not how can I do it? Is the only option left is using props.conf and transforms.conf and sending these events to nullqueue?

Please help!

Regards,
Arpit

Tags (1)
0 Karma

lacastillo
Path Finder

In order to remove events at index time use SEDCMD in props.conf

ex:
[your_custom_sourcetype]
SEDCMD-remove = s/(place_regex_that_matches_events_you_wish_to_remove_here)//g

Let me know if that helps.

0 Karma

sudosplunk
Motivator

Hello,

If 'INFO' and 'DEBUG' events are in the same log file along with other data(you want to ingest), then yes, using props.conf and transforms.conf is the only way. Using blacklist in inputs.conf will only look for the keywords in the name of the source-file not inside the file. Hope this helps.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...