swarm-grafana: sort multi-series bargauge panels by value
Bargauge panels display series in the order the datasource returns them — Grafana has no native sort for that (long-standing upstream gap, grafana#17245). The reliable fix is sorting at the PromQL level with sort_desc() on an instant vector, which forge.json's 'Issues by label' panel already does. Applies the same pattern to the other 14 multi-series bargauge panels across agents.json, claude-usage.json, and authelia.json (the latter two also needed instant: true added, since sort_desc only works on instant vectors). logstore.json's two VictoriaLogs-backed bargauge panels use LogsQL, not PromQL, and are left out of this pass — LogsQL's sort-after-stats has a documented ordering bug in some versions; needs its own verification.
This commit is contained in:
parent
6050033fbc
commit
c7f6c33321
3 changed files with 16 additions and 14 deletions
|
|
@ -255,7 +255,8 @@
|
|||
"type": "prometheus",
|
||||
"uid": "@datasourceUid@"
|
||||
},
|
||||
"expr": "sum by (code) (increase(authelia_request[$__range]))",
|
||||
"expr": "sort_desc(sum by (code) (increase(authelia_request[$__range])))",
|
||||
"instant": true,
|
||||
"legendFormat": "{{code}}"
|
||||
}
|
||||
],
|
||||
|
|
@ -302,7 +303,8 @@
|
|||
"type": "prometheus",
|
||||
"uid": "@datasourceUid@"
|
||||
},
|
||||
"expr": "sum by (code) (increase(authelia_authz[$__range]))",
|
||||
"expr": "sort_desc(sum by (code) (increase(authelia_authz[$__range])))",
|
||||
"instant": true,
|
||||
"legendFormat": "{{code}}"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue