fix(grafana): NUT dashboard instance variable ignores stale series

The variable used label_values() which lists all instances across full
retention, alphabetically sorting and auto-selecting the dead
127.0.0.1:9199 (relabeled to 'eaton' ~31h ago). Its stale series has no
samples in the visible window so every panel rendered empty. Replace with
query_result(count by (instance) (...)) which only surfaces live targets.
This commit is contained in:
Clément Désiles
2026-09-06 23:51:22 +02:00
parent 65fdb4face
commit e4d0812a69
@@ -16,7 +16,8 @@
"label": "UPS", "label": "UPS",
"type": "query", "type": "query",
"datasource": { "type": "prometheus", "uid": "prometheus" }, "datasource": { "type": "prometheus", "uid": "prometheus" },
"query": { "query": "label_values(network_ups_tools_device_info, instance)", "refId": "A" }, "query": { "query": "query_result(count by (instance) (network_ups_tools_device_info))", "refId": "A" },
"regex": "/.*instance=\"([^\"]+)\".*/",
"refresh": 2, "refresh": 2,
"multi": false, "multi": false,
"includeAll": false, "includeAll": false,