Splunk Search

How to extract this value from pipe delimited fields in Splunk?

prategup1
New Member

Hi All

My search results from Splunk look like below

2015-11-13 06:32:33,949|a.abcd|DAS|callabcd():getTime|0.296|SUCCESS|Data : 254|1447414015145[B@8d7c046b8089602570758821847|null|null

I want to extract the value 0.296 from this. Can you please let me know how to do this? I have already tried with below options and it doesn't work.

Option 1:

search_query  | rex field=_raw "^([^|]+|){5} +(?<x>[^|]+)"| table x

Option 2:

search_query  | rex field=_raw "^([^\|]+\|){5} +(?<x>[^\|]+)"| table x
0 Karma

sundareshr
Legend

Will it always be a decimal number? If it will be, you can use this \|(\d\.\d+) Alternately, you could setup field extractions and specify | the delim.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...