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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...