Why Monitoring Matters
Proactive monitoring helps you identify bottlenecks, plan capacity, and prevent outages. This guide covers essential tools for monitoring your dedicated server.
Built-in Linux Tools
- htop: Interactive process viewer with CPU, RAM, and swap usage
- iostat: Disk I/O statistics (
sudo apt install sysstat) - vnstat: Network traffic monitor (
sudo apt install vnstat) - df -h: Disk space usage
- free -h: Memory usage summary
Installing Netdata (Recommended)
Netdata provides a real-time web dashboard with hundreds of metrics out of the box:
# One-line install
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
After installation, access the dashboard at http://your-server-ip:19999. We recommend restricting access with a firewall rule:
sudo ufw allow from YOUR_IP to any port 19999
Setting Up Alerts
Netdata includes built-in alerting. To receive email notifications, edit /etc/netdata/health_alarm_notify.conf:
EMAIL_SENDER="netdata@yourdomain.com"
DEFAULT_RECIPIENT_EMAIL="admin@yourdomain.com"
Long-Term Metrics with Prometheus + Grafana
For historical data analysis, set up Prometheus as a metrics collector and Grafana as a visualization layer. This combination gives you custom dashboards, alerting rules, and trend analysis over weeks or months.
What to Monitor
- CPU usage and load average (alert if > 80% sustained)
- RAM usage and swap activity (alert if swap > 1 GB)
- Disk space (alert if < 10% free)
- Disk I/O latency (alert if > 20ms average)
- Network bandwidth and packet loss
- Service availability (HTTP, SSH, database ports)