From 694ab226ea187543b7987cc396853f2c2515df7c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 10 Dec 2022 12:14:03 +0000 Subject: [PATCH] Only alert for readonly filesystems which were recently writable --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 149ff86bc..16496c12d 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -157,7 +157,7 @@ groups: - name: filesystem rules: - alert: readonly filesystem - expr: node_filesystem_readonly == 1 + expr: node_filesystem_readonly > min_over_time(node_filesystem_readonly[7d]) for: 0m labels: alertgroup: "{{ $labels.instance }}" -- 2.39.5