Splunk Search

Regex for source AND Type

schnibitz
New Member

Hi everyone, Been trying to get regex syntax to behave. What I have below works. It only shows events that are from the source "EMET".

props.conf

[WMI:WinEventLog:Application]
TRANSFORMS-wmi=wminull,wmiparse

transforms.conf

[wmiparse]
REGEX=(?m)^SourceName=(EMET)
DEST_KEY=queue
FORMAT=indexQueue

I'm trying to get it to find EMET source events that are also Error logs.

props.conf

[WMI:WinEventLog:Application]
TRANSFORMS-wmi=wminull,wmiparse

transforms.conf

[wmiparse]
REGEX=(?m)^SourceName=(EMET).*^Type=Error
DEST_KEY=queue
FORMAT=indexQueue

But that doesn't seem to work. Any ideas?

Thanks,
-S

Tags (1)
0 Karma

samjack
New Member

I would use eventtyping for which events are errors.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...