fix(alcyone/grafana): correct Storage gauge thresholds and queries

The top threshold step rendered a 100%-full filesystem in plain text
colour rather than red, so the alarm state was unreachable -- red only
covered 90-99.99%.

Both targets pulled a full range while groupingToMatrix keeps one value
per cell, so switch them to instant queries.

Join on (instance, uuid) rather than uuid alone; with uuid-only matching,
a multi-value $hosts could cross-match filesystems between hosts.

Assisted-by: pi (claude-opus-5)
This commit is contained in:
Gabriel Fontes
2026-08-07 21:48:20 -03:00
parent e5e1048a99
commit d9a6c23e55
@@ -525,10 +525,6 @@
{
"color": "red",
"value": 90
},
{
"color": "text",
"value": 100
}
]
},
@@ -561,17 +557,17 @@
"pluginVersion": "12.3.1",
"targets": [
{
"expr": "sum by (job, instance, uuid) (node_btrfs_used_bytes{instance=\"$hosts\"}) * on(uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
"range": true,
"expr": "sum by (instance, uuid) (node_btrfs_used_bytes{instance=\"$hosts\"}) * on(instance, uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
"range": false,
"legendFormat": "device={{label}},type=used",
"instant": false,
"instant": true,
"refId": "Used Space"
},
{
"expr": "sum by (job, instance, uuid) (node_btrfs_device_size_bytes{instance=\"$hosts\"}) * on(uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
"range": true,
"expr": "sum by (instance, uuid) (node_btrfs_device_size_bytes{instance=\"$hosts\"}) * on(instance, uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
"range": false,
"legendFormat": "device={{label}},type=total",
"instant": false,
"instant": true,
"refId": "Total Space"
}
],