From: Tom Hughes Date: Mon, 21 Aug 2023 18:22:21 +0000 (+0100) Subject: Restrict taginfo alerts to active instances X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/ca5c17ee5e469cd376b3a5546adf1efb5bca7513 Restrict taginfo alerts to active instances --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index d717e4f0a..77400969e 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -693,14 +693,14 @@ groups: - name: taginfo rules: - alert: taginfo planet age - expr: time() - taginfo_data_from_seconds > 129600 + expr: time() - taginfo_data_from_seconds > 129600 and on (instance) chef_role{name="taginfo"} for: 0m labels: alertgroup: taginfo annotations: age: "{{ $value | humanizeDuration }}" - alert: taginfo database age - expr: time() - taginfo_database_update_finish_seconds > 129600 + expr: time() - taginfo_database_update_finish_seconds > 129600 and on (instance) chef_role{name="taginfo"} for: 0m labels: alertgroup: taginfo