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!

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

🍂 Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...