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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...