From: Tom Hughes Date: Tue, 26 Jan 2021 22:25:24 +0000 (+0000) Subject: Improve alert readability X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/2c385f3d70fb6867de8c6f0d846eba62fba1aeb0?ds=sidebyside Improve alert readability --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index d2e076281..d870444ca 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -84,12 +84,12 @@ groups: - name: memory rules: - alert: low memory - expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10 + expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1 for: 5m labels: alertgroup: "{{ $labels.instance }}" annotations: - memory_free: "{{ $value }}%" + memory_free: "{{ $value | humanizePercentage }}" - alert: memory pressure expr: rate(node_vmstat_pgmajfault[1m]) > 1000 for: 5m