Use `diskSelector` variable
This doesn't make a material difference (the only value for `diskSelector` is `/`, which we were already using here), but somebody went to the effort to put this in a variable, so IMO we should be consistent about using it. An alternative would be to just inline the mountpoint everywhere. Let me know what you prefer.
Jeremy Fleischman committed
Jan 31, 2025 at 18:27 UTC
74537d7a2e267e282e0766c3270fd4b2a7d42cbf
1 file changed
+1
-1
build/pluto/prometheus/exporters/node.nix
+1
-1
@@ -78,7 +78,7 @@
78
{
79
alert = "PartitionLowDiskSpace";
80
expr = ''
81
- round((node_filesystem_free_bytes{${diskSelector}} * 100) / node_filesystem_size_bytes{mountpoint="/"}) < 10 and ON (instance, device, mountpoint) node_filesystem_free_bytes < 100 * 1024^3
81
+ round((node_filesystem_free_bytes{${diskSelector}} * 100) / node_filesystem_size_bytes{${diskSelector}}) < 10 and ON (instance, device, mountpoint) node_filesystem_free_bytes < 100 * 1024^3
82
'';
83
for = "30m";
84
labels.severity = "warning";