Real-Time VPS Monitoring with Netdata: CPU, RAM, Disk, and Application Metrics Dashboard
Netdata is an open-source, real-time monitoring agent that visualizes hundreds of system and application metrics in a built-in web dashboard — CPU, RAM, disk I/O, network, Nginx connections, MySQL queries, Docker containers, and more — with per-second granularity and zero configuration for most metrics. Unlike Prometheus + Grafana (which needs significant setup), Netdata works out of the box in 2 minutes.
Netdata vs Prometheus + Grafana
| Factor | Netdata | Prometheus + Grafana |
|---|---|---|
| Setup time | 2 minutes | 30–60 minutes |
| Configuration required | Almost none | Significant |
| Metrics granularity | Per second | Typically 15–60 seconds |
| Long-term retention | Limited (local) | Excellent (customizable) |
| Multi-server aggregation | Yes (Netdata Cloud) | Yes (federation) |
| RAM usage | ~50–100 MB | ~250–500 MB for both |
| Best for | Instant visibility, troubleshooting | Long-term trending, custom dashboards |
Step 1: Install Netdata
<code"># Official installer (handles all dependencies) wget -O /tmp/netdata-install.sh https://get.netdata.cloud/kickstart.sh sh /tmp/netdata-install.sh --stable-channel --no-updates # Verify sudo systemctl status netdata curl http://localhost:19999/api/v1/info | python3 -m json.tool | head -20
Step 2: Secure Access with Nginx
Netdata’s dashboard runs on port 19999. Never expose this directly — proxy through Nginx with authentication:
<code">sudo nano /etc/nginx/sites-available/netdata
<code">server {
listen 443 ssl http2;
server_name monitor.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/monitor.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/monitor.yourdomain.com/privkey.pem;
# Basic authentication
auth_basic "Netdata Monitoring";
auth_basic_user_file /etc/nginx/.netdata_htpasswd;
location / {
proxy_pass http://127.0.0.1:19999;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Compression for dashboard
gzip on;
gzip_types application/json text/plain;
}
}
<code">sudo htpasswd -c /etc/nginx/.netdata_htpasswd admin sudo ln -s /etc/nginx/sites-available/netdata /etc/nginx/sites-enabled/ sudo nginx -t && sudo systemctl reload nginx sudo certbot --nginx -d monitor.yourdomain.com
Also bind Netdata to localhost only:
<code">sudo nano /etc/netdata/netdata.conf
<code">[web]
bind to = 127.0.0.1
<code">sudo systemctl restart netdata
Step 3: What Netdata Monitors Automatically
Without any configuration, Netdata auto-discovers and monitors:
- System: CPU (per core), RAM, swap, load average, processes, context switches
- Disk: I/O operations, throughput, latency, utilization, space usage
- Network: Bandwidth per interface, packets, errors, TCP connections
- Nginx: Active connections, requests/second, reading/writing/waiting
- MySQL/MariaDB: Queries/second, slow queries, connections, replication
- Redis: Operations/second, memory usage, connected clients, keyspace
- PHP-FPM: Active processes, idle processes, request rate
- Docker: CPU and RAM per container
- systemd: Service state, restarts
Step 4: Configure Alerts
Netdata includes 200+ pre-configured alerts. Add your own or modify thresholds:
<code">sudo nano /etc/netdata/health.d/custom.conf
<code"># Alert when disk usage exceeds 85%
alarm: disk_space_usage
on: disk.space
lookup: average -10m percentage of used
calc: $this
every: 1m
warn: $this > 80
crit: $this > 90
info: disk space usage is high
# Alert when RAM usage exceeds 90%
alarm: ram_usage
on: system.ram
lookup: average -5m percentage of used
calc: $this
every: 1m
warn: $this > 85
crit: $this > 95
info: RAM usage is critically high
Step 5: Configure Telegram Notifications
<code">sudo nano /etc/netdata/health_alarm_notify.conf
<code"># Find and uncomment/modify: SEND_TELEGRAM="YES" TELEGRAM_BOT_TOKEN="your_telegram_bot_token" DEFAULT_RECIPIENT_TELEGRAM="your_telegram_chat_id" # Alert severity levels to notify on: # critical: immediate action required # warning: attention needed # clear: alert resolved
<code">sudo systemctl restart netdata # Test notification sudo -u netdata /usr/libexec/netdata/plugins.d/alarm-notify.sh test telegram
Step 6: Tune Netdata for Low-RAM VPS
<code">sudo nano /etc/netdata/netdata.conf
<code">[global]
# Reduce history (default 3600 seconds = 1 hour of per-second data)
history = 1800 # 30 minutes — reduces RAM usage
# Reduce memory pressure
memory deduplication (ksm) = no # Disable KSM on small VPS
# Reduce update frequency (default 1 second)
# update every = 2 # 2-second granularity saves CPU
[web]
bind to = 127.0.0.1
[plugins]
# Disable collectors you don't use
# python.d = no # Uncomment if not using Python-based collectors
# node.d = no
Step 7: Multi-Server Monitoring with Netdata Parent
<code"># On child servers — stream data to parent sudo nano /etc/netdata/stream.conf
<code">[stream]
enabled = yes
destination = parent.yourdomain.com:19999
api key = YOUR_SHARED_API_KEY
<code"># On the parent server — receive streams from children sudo nano /etc/netdata/stream.conf
<code">[YOUR_SHARED_API_KEY]
enabled = yes
history = 3600
default memory mode = save
health enabled by default = auto
Useful Netdata API Endpoints
<code"># Current CPU usage curl -s http://localhost:19999/api/v1/data?chart=system.cpu&after=-60 | python3 -m json.tool # All active alerts curl -s http://localhost:19999/api/v1/alarms | python3 -m json.tool # List all available charts curl -s http://localhost:19999/api/v1/charts | python3 -m json.tool | grep '"id"' | head -30 # Export metrics in Prometheus format curl -s http://localhost:19999/api/v1/allmetrics?format=prometheus | head -50
Getting Started
Netdata installs in 2 minutes on any Ubuntu VPS at VPS.DO and immediately provides per-second visibility into everything happening on the server. The 50–100 MB RAM footprint is appropriate for any VPS plan. For VPS troubleshooting — identifying which process caused a CPU spike 20 minutes ago, or what saturated the disk I/O — Netdata’s per-second historical granularity is invaluable.
Conclusion
Netdata provides instant, zero-configuration visibility into VPS health — CPU, RAM, disk, network, and application metrics at per-second granularity, in a built-in web dashboard, with 200+ pre-configured alerts. For teams that want immediate monitoring without the Prometheus + Grafana setup overhead, Netdata is the right tool. It pairs well with Uptime Kuma (external availability monitoring) and can stream metrics to a central Netdata parent server for multi-VPS visibility.