From: Tom Hughes Date: Sat, 31 Dec 2022 15:41:07 +0000 (+0000) Subject: Alert if the number of SNMP PDUs returned decreases X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/b293ae32304cfb8503a153d5f5a58497311d0896 Alert if the number of SNMP PDUs returned decreases --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 6c8078e45..24a7a725f 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -570,6 +570,15 @@ groups: alertgroup: "{{ $labels.instance }}" annotations: percentage_used: "{{ $value | humanizePercentage }}" + - name: snmp + rules: + - alert: snmp pdus missing + expr: max_over_time(snmp_scrape_pdus_returned[1d]) - snmp_scrape_pdus_returned > 0 + for: 15m + labels: + alertgroup: snmp + annotations: + missing_pdus: "{{ $value }}" - name: ssl rules: - alert: ssl certificate probe failed