Skip to content

Commit

Permalink
nit: add missing diskSelector to node_filesystem_files_free
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jfly committed Feb 1, 2025
1 parent 1f2f5d2 commit 6483b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/pluto/prometheus/exporters/node.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{
alert = "PartitionLowInodes";
expr = ''
node_filesystem_files_free / node_filesystem_files{${diskSelector}} * 100 < 10
node_filesystem_files_free{${diskSelector}} / node_filesystem_files{${diskSelector}} * 100 < 10
'';
for = "30m";
labels.severity = "warning";
Expand Down

0 comments on commit 6483b65

Please sign in to comment.