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
Revered Legend

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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...