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

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...