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.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...