Monitoring
yaml
Intermediate
Prometheus Alerting Rules
Production-ready Prometheus alert rules for high CPU, memory, disk and service downtime.
yaml
groups:
- name: infrastructure
rules:
- alert: HighCPU
expr: 100 - (avg by(instance)(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85
for: 5m
labels: { severity: warning }
annotations:
summary: High CPU detected
- alert: DiskAlmostFull
expr: (node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100 < 15
for: 10m
labels: { severity: critical }
Prerequisites
- Prometheus >= 2.40
- node_exporter
Pro Tips
- → Route critical alerts to PagerDuty.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- yaml
- Level
- Intermediate
- Read time
- 4 min
- Published
- Apr 2025
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Disk IO Monitor
Monitor per-device disk read/write throughput in real time using iostat.
bash
·
Beginner
Cron Job Heartbeat Monitor
Send a heartbeat ping after each cron job run — alert if a heartbeat is missed.
python
·
Intermediate
Datadog Custom Metric Reporter
Report custom business metrics to Datadog from a Python script via DogStatsD.
python
·
Advanced