Why Netdata?
Netdata is an open-source, real-time performance monitoring solution that collects thousands of metrics per second with minimal system overhead.
Prerequisites
Requirements
- • Ubuntu 22.04/24.04, Debian 11/12, or AlmaLinux 8/9
- • Root or sudo access
- • Minimum 512 MB RAM (1 GB+ recommended)
- • Port 19999 available
Features
- • Per-second metric collection
- • 2,000+ auto-detected metrics
- • Built-in alerting system
- • Optional cloud integration
Update Your System
Start by updating your system packages:
sudo apt update && sudo apt upgrade -ysudo dnf update -yInstallation
Quick Installation (Recommended)
Use the official one-line installer:
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.shDuring installation, you'll be prompted to accept the installation and optionally connect to Netdata Cloud.
Alternative: Package Manager
For Ubuntu/Debian with the official repository:
# Install dependencies
sudo apt install -y apt-transport-https gnupg
# Add Netdata repository
wget -O /tmp/netdata-repo.deb https://repo.netdata.cloud/repos/stable/debian/bookworm/netdata-repo_2-2+debian12_all.deb
sudo dpkg -i /tmp/netdata-repo.deb
sudo apt update
# Install Netdata
sudo apt install netdata -yVerify Installation
Check that Netdata is running:
# Check service status
sudo systemctl status netdata
# View version
netdata -vFirewall Access
UFW (Ubuntu/Debian)
Allow access to the Netdata dashboard:
# Allow from specific IP only (recommended)
sudo ufw allow from YOUR_IP_ADDRESS to any port 19999
# Or allow from anywhere (less secure)
sudo ufw allow 19999/tcpfirewalld (AlmaLinux/Rocky)
Configure firewalld:
# Allow from specific IP
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR_IP_ADDRESS" port protocol="tcp" port="19999" accept'
# Or allow from anywhere
sudo firewall-cmd --permanent --add-port=19999/tcp
# Reload firewall
sudo firewall-cmd --reloadAccess the Dashboard
Open your browser and navigate to:
http://YOUR_VPS_IP:19999You'll see the Netdata dashboard displaying real-time metrics for CPU, memory, disk, network, and detected applications.
Security Options
Warning: Running Netdata exposed to the internet without protection is not recommended. Choose one of the security options below.
Option A: Restrict Access by IP
Edit the Netdata configuration:
sudo nano /etc/netdata/netdata.conf[web]
bind to = 127.0.0.1
allow connections from = localhost 192.168.* 10.*sudo systemctl restart netdataOption B: Nginx Reverse Proxy with Auth
Set up Nginx with password authentication:
# Ubuntu/Debian
sudo apt install nginx apache2-utils -y
# AlmaLinux
sudo dnf install nginx httpd-tools -y
# Create password file
sudo htpasswd -c /etc/nginx/.htpasswd netdata_adminsudo nano /etc/nginx/sites-available/netdataupstream netdata {
server 127.0.0.1:19999;
keepalive 64;
}
server {
listen 80;
server_name monitoring.yourdomain.com;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl http2;
server_name monitoring.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/monitoring.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/monitoring.yourdomain.com/privkey.pem;
auth_basic "Netdata Monitoring";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://netdata;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
}
}# Enable site (Ubuntu/Debian)
sudo ln -s /etc/nginx/sites-available/netdata /etc/nginx/sites-enabled/
# Install Certbot and obtain certificate
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d monitoring.yourdomain.com
# Test and restart Nginx
sudo nginx -t
sudo systemctl restart nginxOption C: SSH Tunnel (Quick Access)
For occasional access without exposing ports:
ssh -L 19999:localhost:19999 user@YOUR_VPS_IPThen access the dashboard at http://localhost:19999 in your local browser.
Alerts Configuration
Custom Alert Definition
Create custom alerts:
sudo nano /etc/netdata/health.d/custom.confalarm: cpu_usage_high
on: system.cpu
lookup: average -3m percentage foreach user,system
units: %
every: 1m
warn: $this > 80
crit: $this > 95
delay: down 5m multiplier 1.5 max 1h
info: CPU utilization averaged over 3 minutes
to: sysadminsudo netdatacli reload-healthEmail Notifications
Configure email alerting:
sudo nano /etc/netdata/health_alarm_notify.conf# Enable email notifications
SEND_EMAIL="YES"
# Recipient email
DEFAULT_RECIPIENT_EMAIL="admin@yourdomain.com"
# Sender settings
EMAIL_SENDER="netdata@yourvps.com"Application Monitoring
Check Available Collectors
View available collectors:
ls /etc/netdata/go.d/
ls /etc/netdata/python.d/MySQL/MariaDB Monitoring
Configure MySQL monitoring:
sudo nano /etc/netdata/go.d/mysql.confjobs:
- name: local
dsn: netdata:password@tcp(127.0.0.1:3306)/CREATE USER 'netdata'@'localhost' IDENTIFIED BY 'password';
GRANT USAGE, REPLICATION CLIENT, PROCESS ON *.* TO 'netdata'@'localhost';
FLUSH PRIVILEGES;Nginx Monitoring
Enable Nginx stub status:
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}Netdata will auto-detect the status endpoint.
Docker Container Monitoring
Allow Netdata access to Docker:
sudo usermod -aG docker netdata
sudo systemctl restart netdataNetdata Cloud (Optional)
Connect to Netdata Cloud
Centralize monitoring across multiple servers:
sudo netdata-claim.sh -token=YOUR_CLAIM_TOKEN -rooms=YOUR_ROOM_ID -url=https://app.netdata.cloudGet your claim token from app.netdata.cloud after creating a free account.
Performance Tuning
Reduce Resource Usage
For VPS with limited resources:
sudo nano /etc/netdata/netdata.conf[global]
# Reduce memory usage
memory mode = dbengine
page cache size = 32
dbengine multihost disk space = 256
# Reduce update frequency (default is 1 second)
update every = 2
[web]
# Reduce web client connections
web files owner = root
web files group = netdataDisable Unnecessary Collectors
Disable collectors you don't need:
# List running collectors
sudo netdatacli dumpconfig | grep -A2 "\[plugins\]"[plugins]
# Disable if not needed
cups = no
nfacct = nosudo systemctl restart netdataMaintenance
Common Commands
Useful management commands:
# Check service status
sudo systemctl status netdata
# Restart Netdata
sudo systemctl restart netdata
# View logs
sudo journalctl -u netdata -f
# Update Netdata
sudo /usr/libexec/netdata/netdata-updater.sh
# Check configuration
sudo netdatacli dumpconfig
# Reload health checks
sudo netdatacli reload-healthTroubleshooting
Common Issues
Dashboard Not Loading
sudo systemctl status netdata
sudo ss -tlnp | grep 19999High Memory Usage
sudo nano /etc/netdata/netdata.conf
# Add these settings:
[global]
memory mode = dbengine
dbengine multihost disk space = 128Collector Not Working
# Check collector logs
sudo tail -f /var/log/netdata/collector.log
# Verify collector configuration
sudo /usr/libexec/netdata/plugins.d/go.d.plugin -d -m <module_name>Alerts Not Sending
sudo /usr/libexec/netdata/plugins.d/alarm-notify.sh test