Splunk Dev

how to align values on X-axis

krishna1
Explorer

Iam trying to align values on X-axis in this order : ">3 days" ">5 days" ">15 days" ">30 days" ">100 days"
I have tried table command but its not giving me the expected output.

query:
|inputlookup acn_ticket_unresolved_dessertholdings_kv
| eval age=((now() - epoc_time_submitted)/86400),total_age=round(age,2)
|rangemap field=total_age ">3 days"=0-3.00 ">5 days"=3.01-15.00 ">15 days"=15.01-30.00 ">30 days"=30.01-100.00 ">100 days"=100.01-1000.00
| chart count as count1 over range by priority | rename priority as Priority


krishna1_0-1707368896056.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The chart command will sort string lexicographically, so change your range map to deliver numbers (3, 5, 15, 30, 100), then convert to strings after the chart command

|inputlookup acn_ticket_unresolved_dessertholdings_kv
| eval age=((now() - epoc_time_submitted)/86400),total_age=round(age,2)
|rangemap field=total_age "3"=0-3.00 "5"=3.01-15.00 "15"=15.01-30.00 "30"=30.01-100.00 "100"=100.01-1000.00
| chart count as count1 over range by priority
| eval range=">".range." days" | rename priority as Priority
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 ...