Files
observability/deploy/monitoring/config/vmalert/host-rules.yml
T

40 lines
1.7 KiB
YAML

groups:
- name: host-health
interval: 30s
rules:
- alert: ExporterDown
expr: up == 0
for: 2m
labels:
severity: P1
annotations:
summary: "Target {{ $labels.instance }} is unavailable"
description: "vmagent has failed to scrape {{ $labels.job }}/{{ $labels.instance }} for two minutes."
- alert: HostDiskUsageHigh
expr: 100 * (1 - node_filesystem_avail_bytes{fstype!~"tmpfs|devtmpfs|overlay|squashfs",mountpoint!~"/run($|/.*)"} / node_filesystem_size_bytes{fstype!~"tmpfs|devtmpfs|overlay|squashfs",mountpoint!~"/run($|/.*)"}) > 85
for: 10m
labels:
severity: P2
annotations:
summary: "Disk usage exceeds 85% on {{ $labels.instance }}"
description: "Mount {{ $labels.mountpoint }} has remained above 85% for ten minutes."
- alert: HostDiskPredictedFull
expr: predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs|devtmpfs|overlay|squashfs",mountpoint!~"/run($|/.*)"}[24h], 7 * 24 * 3600) < 0 and node_filesystem_avail_bytes > 0
for: 30m
labels:
severity: P1
annotations:
summary: "Disk may fill within seven days on {{ $labels.instance }}"
description: "The last 24 hours of free-space trend predicts that {{ $labels.mountpoint }} will fill within seven days."
- alert: HostMemoryUsageHigh
expr: 100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) > 85
for: 10m
labels:
severity: P2
annotations:
summary: "Memory usage exceeds 85% on {{ $labels.instance }}"
description: "Available memory has remained below 15% for ten minutes."