Splunk Search

Key Value pair extraction with unique value

mayank141
New Member

Hi,

I need to extract unique values as per below sample data

Its has unique format like [ parameter : mailboxName | value : mail\tdev2.nsf], how to extract the data with parameter name and its value?

[2017-11-06]T[16:33:21.122]Z 31 WebContainer : 4 WARNING [ parameter : mailboxName | value : mail\xdevx.xxx];[ parameter : userID | value : CN=Test Dev2/OU=US/O=xxxDEV];[ parameter : OPERATION | value : SEARCH ];[ parameter : session | value : eSbBsoxxxxxx_O9AIxxxxxx ] [com.xxx.xxx.actions.MainAction: execute]

Please advise.

Thanks
Mayank

0 Karma

MuS
Legend

Hi mayank141,

you can use the search time reporting transforms in props.conf and transforms.conf to get this captured:
props.conf

[mySourceType]
REPORT-myUniqueClassName = myTransform

transforms.conf

[myTransform]
REGEX = \[\s\w+\s:\s(\w+)\s\|\s\w+\s:\s([^\]]+)
FORMAT = $1::$2

This will capture the value after parameter : as field name and the value after value : as value of the field.

Hope this helps ...

cheers, MuS

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

Search time or index time field extraction?

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!

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