Splunk Search

How to custom sort by column headers

DEADBEEF
Path Finder

I have a table that shows the number of logs by severity over each host.  I want to be able to rearrange the severity columns into a specific order but can't figure out how.  I tried using custom sort field via eval but didn't seem to work.

Current SPL

 

index=foo sourcetype=logs
| chart count over server by severity

 


Current Table Order

 

server   major   info   critical    minor
serverA   5       10       8          6
serverB   22       5       13         9

 

 

Desired Table Order

 

server   critical  major   minor  info
serverA   8         5       6      10
serverB   13        22      9       5

 

Labels (2)
Tags (3)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

use table command to re arrange table header:

 

| table server critical major minor info

————————————
If this helps, give a like below.

View solution in original post

thambisetty
SplunkTrust
SplunkTrust

use table command to re arrange table header:

 

| table server critical major minor info

————————————
If this helps, give a like below.
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...