Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion _data/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ groups:
severity: warning
- name: Prometheus target missing
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
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
description: A Prometheus job does not have living target anymore.
query: "sum by (job) (up) == 0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ groups:
description: "A Prometheus job has disappeared\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

- alert: PrometheusTargetMissing
expr: 'up == 0'
expr: 'up == 0 unless on(job) (sum by (job) (up) == 0)'
for: 0m
labels:
severity: critical
Expand Down