Splunk Search

Tranpose the output result

bijodev1
Communicator

Hi There,

I have got some results in after running the below command

my search | 
| bucket _time span=1h
| stats count by _time http_status
| eventstats sum(count) as totalCount by _time
| eval percent=round((count/totalCount),3)*100
| fields - count - totalCount

Output is as follows

time                                      status                    percent

2022-03-02 05:30:0010010.0
2022-03-02 05:30:0020030.0
2022-03-02 05:30:0030060.0
2022-03-02 06:30:0010030.0
2022-03-02 06:30:0020060.0
2022-03-02 07:30:0030010.0
2022-03-02 07:30:0010020.0
2022-03-02 07:30:0020030.0
2022-03-02 06:30:0030050.0

 

I am trying to transpose the output as below :

time                                     100                        200     300 

2022-03-02 05:30:0010.030.060.0
2022-03-02 06:30:0030.060.010.0
2022-03-02 07:30:0020.030.050.0

 

please assist

Labels (5)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| xyseries time status percent

View solution in original post

bijodev1
Communicator

@ITWhisperer  thank you so much, it worked as expected

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| xyseries time status percent
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...