Skip to content

Commit

Permalink
feat(alerting): Add up alert rule with anti-flap and absence detection (
Browse files Browse the repository at this point in the history
  • Loading branch information
simskij authored Oct 23, 2024
1 parent a144ec9 commit 6da23c0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/prometheus_alert_rules/host_health.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
groups:
- name: HostHealth
rules:
- alert: HostDown
expr: up < 1
for: 5m
labels:
severity: critical
annotations:
summary: Host '{{labels.instance}}' is down.
description: >-
Host '{{ $labels.instance }}' is down.
VALUE = {{ $value }}
LABELS = {{ $labels }}
- alert: HostUnavailable
expr: absent(up)
for: 5m
labels:
severity: critical
annotations:
summary: Metrics not received from host '{{labels.instance}}'.
description: >-
The metrics endpoint for host '{{ $labels.instance }}' is unreachable.
VALUE = {{ $value }}
LABELS = {{ $labels }}

0 comments on commit 6da23c0

Please sign in to comment.