monitoring/templates/prometheus/rules/ping.yml

26 lines
734 B
YAML

# vi: syntax=yaml
groups:
- name: Ping
rules:
- alert: HostDown
expr: ping_loss_ratio == 1
for: 3m
labels:
severity: critical
annotations:
summary: Host down (host {{ $labels.target }})
description: "Host {{ $labels.target }} doesn't respond to ICMP pings, VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: PingLoss
expr: |
avg_over_time(ping_loss_ratio[10m]) > 0.1 and min_over_time(ping_loss_ratio[10m]) < 1
for: 0m
labels:
severity: warning
annotations:
summary: High packet loss (host {{ $labels.target }})
description: "ICMP pings have a loss ratio > 10%, VALUE = {{ $value }}\n LABELS = {{ $labels }}"