From f9c7ef7c00ab594a67af5a69acd906ffb51c77b3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 8 Mar 2023 20:28:06 +0000 Subject: [PATCH] Add a packet loss alert --- .../prometheus/templates/default/alert_rules.yml.erb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 239731607..b0094a83b 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -584,6 +584,15 @@ groups: alertgroup: "{{ $labels.instance }}" annotations: percentage_used: "{{ $value | humanizePercentage }}" + - name: smokeping + rules: + - alert: packet loss + expr: 100 - (rate(smokeping_response_duration_seconds_count[5m]) * 100 / rate(smokeping_requests_total[5m])) > 0 + for: 5m + labels: + alertgroup: smokeping + annotations: + loss_rate: "{{ $value | humanizePercentage }}" - name: snmp rules: - alert: snmp pdus missing -- 2.39.5