Update rules.yml

This commit is contained in:
Samuel Berthe 2026-02-21 19:39:21 +01:00 committed by GitHub
parent 39f577a0e5
commit 42de016d23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,8 +19,11 @@ groups:
severity: warning severity: warning
- name: Prometheus target missing - name: Prometheus target missing
description: A Prometheus target has disappeared. An exporter might be crashed. description: A Prometheus target has disappeared. An exporter might be crashed.
query: "up == 0" query: "up == 0 unless on(job) (sum by (job) (up) == 0)"
severity: critical severity: critical
comments: |
Only fire if at least one target in the job is still up.
If all targets are down, PrometheusJobMissing or PrometheusAllTargetsMissing will fire instead.
- name: Prometheus all targets missing - name: Prometheus all targets missing
description: A Prometheus job does not have living target anymore. description: A Prometheus job does not have living target anymore.
query: "sum by (job) (up) == 0" query: "sum by (job) (up) == 0"