Server monitoring tells you something is wrong before your visitors do. A full disk, a memory leak or an expired certificate can all be caught early with a few checks and alerts. This guide covers the server monitoring basics: what to measure, when to alert, and free tools to do it.
Before you start
You need SSH access for on-server tools. External uptime checks work for any site, including shared hosting.
What to monitor
| Metric | Why it matters | Suggested alert |
|---|---|---|
| Uptime (HTTP/ping) | Is the site reachable from outside? | Fails from 2+ locations |
| CPU and load average | Saturation slows every request | Load above thread count for 10+ min |
| Memory and swap | Swapping and OOM kills | Available RAM under 10%, swap in use growing |
| Disk space and inodes | Full disks break databases, mail and logs | Over 85% used |
| Disk I/O wait | Slow storage stalls everything | iowait high for several minutes |
| Network traffic | Attacks, bandwidth overage | Unusual spikes |
| Services | Web, database, mail processes | Process down |
| SSL certificate expiry | Browsers block expired certs | Under 14 days left |
| RAID/SMART health | Failing disks on dedicated servers | Any degraded array or SMART error |
Quick checks from the command line
uptime– load averages for 1, 5 and 15 minutes.htop– live CPU, memory and processes.free -h– RAM and swap.df -handdf -i– disk space and inodes.iostat -x 5(packagesysstat) – disk utilisation and wait times.systemctl --failed– services that crashed.journalctl -p err -b– errors since the last boot.
Free monitoring tools
External uptime monitoring
Run checks from outside your server so they still work when it is down. Uptime Kuma is a self-hosted dashboard you can run on a separate small VPS; many hosted services also offer free tiers with email alerts.
Netdata
Real-time, per-second dashboards for CPU, memory, disks, network and many services, with built-in alerts. Install it with the official script from the Netdata website and restrict its port to your IP.
Prometheus and Grafana
The standard for monitoring many servers: node_exporter exposes metrics, Prometheus stores them and Grafana draws dashboards. More setup, but very flexible.
Monit
A small daemon that checks processes, files and ports, and restarts a service automatically if it dies.
sysstat (sar)
Records historical CPU, memory and I/O so you can see what happened at 3 a.m. Enable it with systemctl enable --now sysstat and query with sar.
Set up alerts sensibly
- Alert on symptoms users feel (site down, slow responses) first.
- Require a condition to last a few minutes so short spikes do not page you.
- Send alerts to a channel someone actually reads.
- Review alerts monthly and remove noisy ones.
Troubleshooting with monitoring data
- Load high, CPU idle: processes are waiting on disk – check iowait.
- Memory slowly climbing until restart: likely a leak in an app or too many workers.
- Disk full overnight: look for huge logs with
du -sh /var/log/*.
FAQ: server monitoring basics
Do I need monitoring on shared hosting?
An external uptime check is still useful. Resource usage is shown in cPanel, and the host monitors the server itself.
Should the monitor run on the same server?
Metrics collection can, but uptime checks and alerting should run elsewhere so they survive an outage.
What is a good load average?
Below the number of CPU threads is healthy. Check yours with nproc.
