From c57272306ac65a1da51dbb84b3fec9ee3be846da Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 15 Nov 2022 21:30:09 +0000 Subject: [PATCH] Fix wildcard match for Juniper fan state --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index e3fa634ea..9522dbf6b 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -247,12 +247,12 @@ groups: - name: juniper rules: - alert: juniper fan alarm - expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!~"running"}[6m]) > 0 + expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!~"running.*"}[6m]) > 0 for: 5m labels: alertgroup: "{{ $labels.site }}" - alert: juniper power alarm - expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!~"running"}[6m]) > 0 + expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!~"running.*"}[6m]) > 0 for: 5m labels: alertgroup: "{{ $labels.site }}" -- 2.39.5