tune Targets Missing rules

This commit is contained in:
dxray 2026-02-14 00:30:20 +02:00
parent 52cc00fc4c
commit f9d5127c3d

View file

@ -15,7 +15,7 @@ groups:
description: "A Prometheus job has disappeared\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" description: "A Prometheus job has disappeared\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: PrometheusTargetMissing - alert: PrometheusTargetMissing
expr: 'up == 0' expr: 'up == 0 unless sum by (job) (up) == count by (job) (up)'
for: 0m for: 0m
labels: labels:
severity: critical severity: critical
@ -24,7 +24,7 @@ groups:
description: "A Prometheus target has disappeared. An exporter might be crashed.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" description: "A Prometheus target has disappeared. An exporter might be crashed.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: PrometheusAllTargetsMissing - alert: PrometheusAllTargetsMissing
expr: 'sum by (job) (up) == 0' expr: 'sum by (job) (up) == 0 and count by (job) (up) > 1'
for: 0m for: 0m
labels: labels:
severity: critical severity: critical