Splunk Search

Yet More field extraction problems

integritysuppor
Engager

My application logs to win event application log. I have the following log and am trying to extract the SAG: values:
Message=Component: Sag:SN-I
Event Number: 206 Event Class: Security
Description: foobar
SWIFTNet User : frodo
Certificate : HSM1:seo-sag1
DN : cn=seo-sag1,o=irceie2d,o=swift

So in the above I would be trying to get SN-I

I use the field extractor and it tells me that everything is extracting correctly but when the field is generated in the search it extracts everything from SN-I to the end of the log as a field.

The regex the field extraction uses is: (?i) Sag:(?P.+)

I've tried to use $ and \z \Z at the end of the regex to signify the end but it still extracts everything from SN-I to the end of the log.

Any ideas what's going on here as I managed to extract the Event Number without any issue.

Tags (3)
0 Karma
1 Solution

starcher
SplunkTrust
SplunkTrust

Try: (?i) Sag:(?P.[^ ]+)

View solution in original post

0 Karma

starcher
SplunkTrust
SplunkTrust

Try: (?i) Sag:(?P.[^ ]+)

0 Karma

integritysuppor
Engager

yeah that pretty much did it, was outputting as "SN-I Event" though.

So final regex that I used:

(?i) Sag:(?P.[^ ]+)Event

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 ...