mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-26 11:27:00 +08:00
tune Targets Missing rules
This commit is contained in:
parent
52cc00fc4c
commit
f9d5127c3d
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue