Splunk Search

splunk discard specific events

pdash
Path Finder
{[-] EventInfo : {[+]}, EventType : "INFO", Properties : {[+]}, TimeStamp : "2014-01-03T19:31:30.3319998Z" }

How do i discard events that have EventType = INFO?

Currently my transforms and props are:

(transforms)

[treessvcignore] 
REGEX = \"EventType\"\:\"INFO\" 
DEST_KEY = queue 
FORMAT = nullQueue

(props)

[host::TREESSVC*] 
TRANSFORMS-null = treessvcignore

This data is in json format

The raw data looks like this
The raw event is

{"EventType":"INFO","TimeStamp":"2014-01-03T06:59:59.9645694Z","Properties":{"StackId":"PER_RNK","applicationClass":"CollatorApplication","name":"PersonRank","type":"Collator","serverClassType":"Live","serverClassApplication":"Multi","ComponentId":"PersonRank","ClientId":"Unknown","ClassName":"CollatorHandlers","MethodName":"Query","ClientPath":"Unknown","RequestPath":"a61a2538-9ef6-4c2c-8579-0d6e073c4159","Metric":...
Tags (2)

lguinn2
Legend

dwaddle 's answer is great, but I think I see some typos in your REGEX, based on the sample event. I would do it this way

REGEX = "EventType"\s*:\s*"INFO" 

ah - I didn't see the quotes at first in the raw data.

0 Karma

pdash
Path Finder

Doesnot work either. It still shows up newly indexed data that have info in eventtype

0 Karma

dwaddle
SplunkTrust
SplunkTrust

I tested your configuation on my test system with your example event, and it seems to have filtered the event just fine. So I believe your configuration is (fundamentally) correct. Some questions:

  1. Where is this configuration defined? On a forwarder, or the indexer? With Light or Universal forwarders, this configuration needs to be installed at the indexer. If there is a heavy forwarder in your environment, it needs to be at the first heavy forwarder that will touch the event.
  2. Have you restarted Splunk since applying this change?
  3. Are these configs in an app or in the $SPLUNK_HOME/etc/system/local directory?
  4. Have you checked with the btool command to make sure your config is not being overridden by some other app? ( http://blogs.splunk.com/2012/10/02/tips-and-tricks-for-the-new-guy/ )

pdash
Path Finder

Thanks. So its on indexer not on forwarder. And within splunkhome/etc/system/local dir. Also i restarted to make the changes effective

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...