Splunk Enterprise

Columns to rows and count

Atif
Explorer

Dear Splunkers,

 

The result of my search is like :

TXID,STATUS_A,STATUS_B,STATUS_C

A,OK,OK,OK

B,OK,KO,INPROGRESS

C,OK,OK,KO

D,OK,KO,KO

E,KO

 

Transaction E has no STATUS_B nor STATUS_C fields

What i'am trying to get is a count over all STATUS columns :

STATUS_NAME,OK_COUNT,KO_COUNT,INPROGRESS_COUNT

STATUS_A,4,1,0

STATUS_B,2,2,0

STATUS_C,1,2,1

 

Any hints are welcome.

Thank you

 

Labels (1)
Tags (4)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| untable TXID status result
| stats count by status result
| xyseries status result count

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| untable TXID status result
| stats count by status result
| xyseries status result count
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...