nit: add missing `diskSelector` to `node_filesystem_files_free`
IIUC, this doesn't change the behavior of this query at all (Prometheus will still only pick values for `node_filesystem_files_free` and `node_filesystem_files` where all the labels match), but perhaps makes it cleaner to read. I'm extremely new to PromQL, and I'm mostly filing this as a learning opportunity. Are there best practices around this sort of thing? Do we like the way this was written, and should I change our other expressions ot match (some of the other expressions use `${diskSelector}` twice).
Jeremy Fleischman committed
Feb 1, 2025 at 09:44 UTC
5d0261c9b6b0fd14fe07f380c8a4d80821635d17
1 file changed
+1
-1
build/pluto/prometheus/exporters/node.nix
+1
-1
@@ -68,7 +68,7 @@
68
{
69
alert = "PartitionLowInodes";
70
expr = ''
71
- node_filesystem_files_free / node_filesystem_files{${diskSelector}} * 100 < 10
71
+ node_filesystem_files_free{${diskSelector}} / node_filesystem_files{${diskSelector}} * 100 < 10
72
'';
73
for = "30m";
74
labels.severity = "warning";