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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...