Splunk Search

How to pivot results table?

vinod0313
Explorer

vinod0313_0-1597755551180.png

I got above result from my splunk query:  index="cx_aws" source="notifications-service"|stats count by tokenValidatorInfo,requestValidationRequired,requestPayloadValidationRequired,responsePayloadValidationRequired,aopUsed|rename tokenValidatorInfo as "TOKENVALIDATION"|rename requestValidationRequired as "REQUESTVALIDATION"|rename requestPayloadValidationRequired as "REQUESTPAYLOADVALIDATION"|rename responsePayloadValidationRequired as "RESPONSEPAYLOADVALIDATION"|rename aopUsed as AOP|fields TOKENVALIDATION,REQUESTVALIDATION,REQUESTPAYLOADVALIDATION,RESPONSEPAYLOADVALIDATION,AOP



But i want the result sholud be like below

TOKENVALIDATION:true
REQUESTVALIDATION:false
REQUESTPAYLOADVALIDATION:false
RESPONSEPAYLOADVALIDATION:true
AOP:false


could anyone help me?

Labels (1)
0 Karma

impurush
Contributor

Hi @vinod0313 

You can use |transpose function at the end of your query and it will transpose all the x-axis into the y-axis.

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