Why Regular VPS Health Checks Matter
Your VPS is the backbone of your online operations — whether it hosts a web application, API backend, CI/CD pipeline, or database cluster. Without proactive monitoring, small issues like a runaway process filling the disk or a memory leak can escalate into full outages affecting users and revenue. This guide provides a comprehensive health checklist organized by frequency: daily, weekly, and monthly checks that every Linux server administrator should implement.
Consistent health checks help you catch problems early, maintain performance SLAs, and ensure backups are actually restorable. The effectiveness of your monitoring also depends on your provider’s infrastructure — you can compare VPS providers on our comparison table to find those offering advanced monitoring dashboards, SNMP support, and SLA-backed uptime guarantees.
Daily Health Checks (5 Minutes)
| Check | Command | What to Look For | Action at Threshold |
|---|---|---|---|
| Disk Usage | df -h | Root partition >80% full | Investigate or add storage at 85% |
| Memory Pressure | free -m; vmstat 1 5 | Swap usage >0 or <10% available RAM | Add swap file or upgrade plan |
| CPU Load | uptime; mpstat -P ALL 1 3 | Load average > vCPU count for 5+ min | Identify top processes via top |
| Running Services | systemctl list-units --state=running | Expected services stopped | Restart and check journalctl -xe |
| Auth Failures | journalctl -u sshd --since=24h ago | grep "Failed password" | wc -l | >50 failed attempts in 24h | Review fail2ban jails and firewall rules |
| Network Latency | ping -c 20 -i 0.2 8.8.8.8 | Packet loss >1% or avg latency >50ms | Check interface errors with ip -s link |
Weekly Health Checks (15 Minutes)
| Check | Command | What to Look For | Action at Threshold |
|---|---|---|---|
| Security Updates | apt list --upgradable 2>/dev/null | Kernel or critical package updates | Apply via unattended-upgrades |
| Error Logs | journalctl -p err -b --since=7d ago | Recurring error patterns | Triage by severity, create alerts |
| Backup Verification | Restore test on staging VPS | Corrupt or missing backups | Fix backup pipeline immediately |
| Disk I/O Performance | iostat -x 1 5 | await >10ms or %util >90% | Check for I/O wait via iotop |
| Open Ports Audit | ss -tlnp | Unexpected listening services | Audit and close unnecessary ports |
| Certificate Expiry | openssl s_client -connect localhost:443 2>/dev/null | openssl x509 -noout -enddate | Expiring within 14 days | Renew via certbot or ACME client |
Monthly Health Checks (30 Minutes)
- Kernel audit — Check
uname -ragainst latest LTS kernel. Reboot if patched since last month. - Resource trend analysis — Compare
sar -Aor Prometheus metrics over 30 days to identify growth patterns. - Firewall rule review — Audit
ufw status numberedoriptables -L -n -vfor stale rules. - Full restore drill — Provision a clean VPS, restore from your most recent backup, and verify service functionality.
- Performance baseline update — Run
sysbenchCPU, memory, and disk benchmarks to detect hardware degradation. - Log rotation health — Check
logrotate -d /etc/logrotate.confto ensure logs aren’t consuming excess disk.
Automating Health Checks with Shell Scripts
Rather than running checks manually, deploy this unified health script:
#!/bin/bash
# /usr/local/bin/vps-health-check.sh
set -euo pipefail
THRESHOLD_DISK=80
THRESHOLD_LOAD=$(nproc)
ALERT_EMAIL="[email protected]"
# Disk check
DISK_USE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//')
if [ "$DISK_USE" -gt "$THRESHOLD_DISK" ]; then
echo "ALERT: Root disk at ${DISK_USE}%" | mail -s "VPS Health Alert" "$ALERT_EMAIL"
fi
# Load check
LOAD=$(uptime | awk -F'load average:' '{print $2}' | cut -d, -f1 | xargs)
LOAD_INT=${LOAD%.*}
if [ "$LOAD_INT" -gt "$THRESHOLD_LOAD" ]; then
echo "ALERT: Load average ${LOAD} exceeds vCPU count ${THRESHOLD_LOAD}" | mail -s "VPS Health Alert" "$ALERT_EMAIL"
fi
# Auth failure check
FAIL_COUNT=$(journalctl -u sshd --since=24h ago | grep "Failed password" | wc -l)
if [ "$FAIL_COUNT" -gt 50 ]; then
echo "ALERT: ${FAIL_COUNT} SSH failures in 24h" | mail -s "VPS Health Alert" "$ALERT_EMAIL"
fi
echo "Health check completed at $(date) — no critical issues" | logger -t health
Add to cron for daily execution:
0 8 * * * root /usr/local/bin/vps-health-check.sh
Conclusion
A structured VPS health check regimen — daily quick checks, weekly deep dives, and monthly audits — catches problems before they become outages. Automate the daily checks with cron and shell scripts to ensure consistency even when you are not at the keyboard. For long-term monitoring, consider integrating Prometheus and Grafana for real-time dashboards. To ensure your underlying VPS infrastructure can support comprehensive monitoring, see performance benchmarks on our comparison page when choosing between providers for production deployments.




Leave a Reply
You must be logged in to post a comment.