]> git.openstreetmap.org Git - chef.git/commitdiff
Restrict taginfo alerts to active instances
authorTom Hughes <tom@compton.nu>
Mon, 21 Aug 2023 18:22:21 +0000 (19:22 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 21 Aug 2023 18:22:33 +0000 (19:22 +0100)
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