From: Tom Hughes Date: Wed, 8 Mar 2023 22:44:29 +0000 (+0000) Subject: Scale some percentage values correctly in alerts X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/fea950ed284fb2038b38175afa4e76bb233f2699 Scale some percentage values correctly in alerts --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index b0094a83b..f79438182 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -578,7 +578,7 @@ groups: labels: alertgroup: "{{ $labels.instance }}" - alert: smart ssd wearout approaching - expr: smart_percentage_used >= 80 + expr: smart_percentage_used / 100 >= 0.8 for: 60m labels: alertgroup: "{{ $labels.instance }}" @@ -587,7 +587,7 @@ groups: - name: smokeping rules: - alert: packet loss - expr: 100 - (rate(smokeping_response_duration_seconds_count[5m]) * 100 / rate(smokeping_requests_total[5m])) > 0 + expr: 1 - (rate(smokeping_response_duration_seconds_count[5m]) / rate(smokeping_requests_total[5m])) > 0 for: 5m labels: alertgroup: smokeping