Prometheus Alertmanager Production Alert Rules Template
groups:
- name: host_infrastructure_alerts
rules:
- alert: HostHighCpuUsage
expr: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85
for: 5m
labels:
severity: warning
annotations:
summary: "High CPU load on host {{ $labels.instance }}"
description: "CPU load has exceeded 85% for more than 5 minutes (current value: {{ $value }}%)."
- alert: HostMemoryExhaustion
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100 < 10
for: 3m
labels:
severity: critical
annotations:
summary: "Critical RAM exhaustion on {{ $labels.instance }}"
description: "Host available memory is below 10% (current free: {{ $value }}%)."
- alert: HostDiskFillingFast
expr: (node_filesystem_free_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"}) * 100 < 15
for: 10m
labels:
severity: warning
annotations:
summary: "Root filesystem low on disk space on {{ $labels.instance }}"
description: "Remaining disk space on / is below 15%."
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: critical
annotations:
summary: "Service target {{ $labels.instance }} is down"
description: "Prometheus scraper cannot connect to target for over 1 minute."