From aa5c4cd643dd66e3171328015ea56c1b917456cc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 Jul 2022 17:34:43 +0100 Subject: [PATCH] Add alert rules for juniper switches --- .../prometheus/templates/default/alert_rules.yml.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 289b33f57..96f7fdb02 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -207,6 +207,18 @@ groups: for: 5m labels: alertgroup: "{{ $labels.instance }}" + - name: juniper + rules: + - alert: juniper fan alarm + expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"} > 0 + for: 5m + labels: + alertgroup: "{{ $labels.site }}" + - alert: juniper power alarm + expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"} > 0 + for: 5m + labels: + alertgroup: "{{ $labels.site }}" - name: mail rules: - alert: exim queue length -- 2.39.5