Getting Data In

field extract - extract everything between two values

splunkbacon
Explorer

I want to simply take an event and parse EVERYTHING between two strings and make it a field...the built in field extractor in splunk is garbage and does not help with this simple extraction. The string would be like below:

suser=Joe blow cat=Upload Policy - On Corp sourceServiceName=Server01

How can I simply (within the field extractor, not a search), take everything between "cat=" and "SourceServiceName=" and make that into a field called policyName?

Tags (1)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

In the field extractor, you've option to specify your own regex. You can use cat=(?<FieldNameOfYourChoosing>.+) sourceServiceName= to extract what you need.

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

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...