Dashboards & Visualizations

Adjusting the x-axis on chart count

dannyzen
Explorer

I'm using | chart count over severity by technique to display events by level of severity
Currently I am not getting severity in order from Highest to Lowest on the x-axis where the order is off in the column chart visualization
I've also tried
| stats count by severity technique

What would be an effective way to have these order correctly?
Thanks in advance!

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

index=_* sourcetype!=audittrail
| stats count BY log_level
| eval _log_level = case(
   log_level=="INFO", 0,
   log_level=="WARN", 1,
   log_level=="ERROR", 2,
   log_level=="MAJOR", 3,
   log_level=="MINOR", 4,
   log_level=="CRITICAL", 5)
| sort 0 _log_level

View solution in original post

0 Karma

woodcock
Esteemed Legend

Like this:

index=_* sourcetype!=audittrail
| stats count BY log_level
| eval _log_level = case(
   log_level=="INFO", 0,
   log_level=="WARN", 1,
   log_level=="ERROR", 2,
   log_level=="MAJOR", 3,
   log_level=="MINOR", 4,
   log_level=="CRITICAL", 5)
| sort 0 _log_level
0 Karma

dannyzen
Explorer

Thank you! this is great

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

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 ...