Getting Data In

How to extract a key and value from the Raw data?

Stevelim
Communicator

While I understand the regex command and click based extraction of data fields. How do I extract both of them via the raw data?

For example:

$ABCD,,Speed,Nmea,63*33

From these, I will like to have a key Speed = 64 for example. I am guessing I need to perform some regex at the transforms.conf. But I am not exactly sure how to start.

0 Karma

woodcock
Esteemed Legend

In transforms.conf:

Using FORMAT:

REGEX = (?:[^,]*,){2}([^,]+),[^,]*,([^,]+)
FORMAT = $1::$2

Not using FORMAT:

REGEX = (?:[^,]*,){2}(?<_KEY_1>[^,]+),[^,]*,(?<_VAL_1>[^,]+)
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...