Splunk Search

How to filter input log for certain record only

daniel_splunk
Splunk Employee
Splunk Employee

I've lot of udp log and only a small portion of them contain error and need to investigate. I don't want to index all of them. Are there any way to just index those record with text ERROR.

Tags (1)
0 Karma

daniel_splunk
Splunk Employee
Splunk Employee

You can use below tramsforms.conf to index the event that you need.

@inputs.conf
[udp://514]
connection_host = ip
sourcetype = syslog 

@props.conf
[source::udp:514]
TRANSFORMS-routing = setNull, error_to_index

@transforms.conf
[setNull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[error_to_index]
REGEX = ERROR
DEST_KEY = queue
FORMAT = indexQueue
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...