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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...