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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...