]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/templates/default/alert_rules.yml.erb
Restrict taginfo alerts to active instances
[chef.git] / cookbooks / prometheus / templates / default / alert_rules.yml.erb
index d717e4f0aeedacf3f5c8fc628485c9b945eedc05..77400969edb72db718778b5737f97c3228b78d53 100644 (file)
@@ -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