Server Management
Netdata - Real-Time Monitoring
How to install Netdata to monitor CPU, RAM, disk and network of your VPS in real time via browser
Netdata is a lightweight monitoring tool that installs in one command and offers real-time dashboards accessible via browser. Much simpler to configure than Grafana+Prometheus.
Installation
# Automatic installation (one command)
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh
sudo sh /tmp/netdata-kickstart.sh --stable-channel --dont-start-it
# Start and enable
sudo systemctl start netdata
sudo systemctl enable netdata
# Verify
sudo systemctl status netdataDashboard access
By default Netdata listens on port 19999 on localhost. To access it:
Direct access (insecure, testing only)
# Open the port in firewall only from your IP
sudo ufw allow from 1.2.3.4 to any port 19999Go to http://SERVER_IP:19999
Secure access via Nginx reverse proxy (recommended)
sudo nano /etc/nginx/sites-available/netdataserver {
listen 80;
server_name monitor.yourdomain.com;
# Basic authentication (optional but recommended)
auth_basic "Monitor";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_pass http://127.0.0.1:19999;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}sudo ln -s /etc/nginx/sites-available/netdata /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
# Create user for authentication
sudo htpasswd -c /etc/nginx/.htpasswd adminWhat it monitors (by default)
- CPU: usage per core, frequency, interrupts
- RAM and swap: usage, free, cached
- Disk: I/O, latency, space used, inode
- Network: bandwidth, packets, errors per interface
- Processes: top processes by CPU/RAM
- Nginx/Apache: active connections, requests/sec
- MySQL/MariaDB: queries/sec, connections, threads
- Docker: CPU and RAM per container
- Redis: commands, memory, hit rate
Configuration
# Main file
sudo nano /etc/netdata/netdata.confRecommended configuration for VPS:
[global]
# Reduce retention (save disk)
history = 3600 # 1 hour of history in RAM
[web]
# Accept connections only from localhost (use reverse proxy)
bind to = 127.0.0.1
[plugins]
# Disable unused plugins
tc = no
idlejitter = nosudo systemctl restart netdataAlerts and notifications
Netdata has pre-configured alerts. To receive email notifications:
sudo nano /etc/netdata/health_alarm_notify.conf# Email
SEND_EMAIL="YES"
DEFAULT_RECIPIENT_EMAIL="your@email.com"
SENDMAIL_SENDER="netdata@yourserver.com"For Telegram notifications:
SEND_TELEGRAM="YES"
TELEGRAM_BOT_TOKEN="123456:ABC-DEF..."
DEFAULT_RECIPIENT_TELEGRAM="@yourchannel"
# or numeric chat ID: "123456789"Update Netdata
sudo /usr/libexec/netdata/netdata-updater.sh
# or
sudo apt upgrade netdata -yNetdata Cloud (optional)
You can connect the server to Netdata Cloud (free) to access dashboards without opening ports:
# Follow registration wizard at https://app.netdata.cloud
# Then connect the node with provided token
sudo netdata-claim.sh -token=TOKEN -rooms=ROOM_ID -url=https://app.netdata.cloudUninstall
sudo /usr/libexec/netdata/netdata-uninstaller.sh --yes