Files

1.1 KiB

VPS Threshold Alerting System

Deployed Jul 9, 2026. Monitors all 10 servers for RAM, disk, and CPU usage at 80%, 90%, and 95% thresholds. Alerts via Telegram.

Script

/root/.hermes/scripts/vps-threshold-check.sh

Cron

vps-threshold-check — every 15 min, no_agent, script-only. Silent on success, alerts on threshold crossings.

What it checks per server

  • Disk: df -h / | awk 'NR==2 {print $5}' | tr -d '%'
  • RAM: free | awk '/Mem:/ {printf "%.0f", $3/$2 * 100}'
  • CPU: top -bn1 | awk '/Cpu(s)/ {print $2}'
  • Core count: nproc (for load average comparison)

Thresholds

  • 80% — warning
  • 90% — critical
  • 95% — emergency

Each threshold is tracked independently. Re-alerts suppressed for 24 hours. Automatic reset when metric drops below threshold.

Alert tracking

/root/.hermes/data/threshold-alerts.json — format: {hostname}_{metric}_{threshold} → ISO timestamp

Alert format

🚨 VPS Alert: ai.itpropartner.com
  ⚠️ DISK at 92% (threshold: 90%)
  ⚠️ RAM at 83% (threshold: 80%)

Multiple threshold crossings on one server are combined into a single message.