Splunk Search

How to add extracted fields name as first column value

techytanzy
Explorer

Hello Splunk Gurus,

I am trying to generate tabular data for the API requests.

Following is the query to extract below table data

The FirstComp, SecondComp and ThirdComp are fields extracted at run time from log.

index=micro host=app150*usa.com "API Timeline" |
rex field=_raw "FirstCompTime:(?<FirstComp>[^\,]+)" |
rex field=_raw "SecondCompTime:(?<SecondComp>[^\,]+)" |
rex field=_raw "ThirdCompTime:(?<ThirdComp>[^\,]+)" | table FirstComp, SecondComp, ThirdComp

FirstCompSecondCompThirdComp
782531
802234
812636

 

Now I need to calculate the 95th and 99th percentile and making sure components name appear as part of first column as shown  below-

Components95th percentile99th percentile
FirstComp7779
SecondComp2324
ThirdComp3235

 

The desired output should show 99th percentile & 95th percentile by different component id.

So eventually i want to bring column headers name as part of first column's value and next two column should have respective 99th percentile & 95th percentile.

Thanks in advance for your time and help.

Tanzy

Labels (2)
0 Karma

techytanzy
Explorer

Any idea @niketn ?

0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @techytanzy 

What's your expected output table format?

0 Karma

techytanzy
Explorer

Hi @venkatasri ,

   Pardon me for not providing proper request. Updated the post. Hope its clear on requirement.

Thanks

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...