From 2c385f3d70fb6867de8c6f0d846eba62fba1aeb0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 26 Jan 2021 22:25:24 +0000 Subject: [PATCH] Improve alert readability --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5