mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-26 11:27:00 +08:00
reworked query logic
This commit is contained in:
parent
f9d5127c3d
commit
39f577a0e5
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 }}"
|
||||
|
||||
- alert: PrometheusTargetMissing
|
||||
expr: 'up == 0 unless sum by (job) (up) == count by (job) (up)'
|
||||
expr: 'up == 0 unless on(job) (sum by (job) (up) == 0)'
|
||||
for: 0m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
@ -24,7 +24,7 @@ groups:
|
|||
description: "A Prometheus target has disappeared. An exporter might be crashed.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
||||
|
||||
- alert: PrometheusAllTargetsMissing
|
||||
expr: 'sum by (job) (up) == 0 and count by (job) (up) > 1'
|
||||
expr: 'sum by (job) (up) == 0'
|
||||
for: 0m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
|
|||
Loading…
Reference in a new issue