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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...