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!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...