Monitor VPS Performance with Netdata: Ubuntu Server Setup Tutorial

By Raman Kumar

Share:

Updated on May 02, 2026

Monitor VPS Performance with Netdata: Ubuntu Server Setup Tutorial

Why Real-Time VPS Monitoring Matters for Your Server

Your VPS runs smoothly until it doesn't. CPU spikes hit 100%, memory gets consumed by runaway processes, or disk I/O grinds to a halt. Without proper monitoring, you'll only discover these problems when your sites go down and customers start complaining.

Netdata changes this completely. It provides real-time, interactive dashboards showing exactly what's happening on your server right now. You get per-second metrics for CPU, memory, disk, network, and hundreds of other system components.

Unlike heavyweight monitoring solutions that require complex setups, Netdata installs in minutes and starts collecting metrics immediately. This makes it perfect for VPS hosting environments where you need visibility without the overhead.

Install Netdata on Ubuntu VPS Server

The installation process takes just a few commands. Netdata's automatic installer handles dependencies and configuration for you.

First, update your package cache and install required dependencies:

sudo apt update
sudo apt install curl wget -y

Download and run the Netdata installer script:

bash <(curl -Ss https://my-netdata.io/kickstart.sh)

The installer asks for confirmation before proceeding. Type 'y' to continue. It automatically detects your Ubuntu version and installs the appropriate packages.

You'll see output showing various components being compiled and configured. This process typically takes 2-3 minutes on most VPS configurations. Once complete, Netdata starts automatically and begins collecting metrics. The service runs on port 19999 by default.

Configure Netdata Security and Access Control

By default, Netdata binds to all network interfaces, which isn't secure for production use. You need to restrict access and set up proper authentication.

Edit the main configuration file:

sudo nano /etc/netdata/netdata.conf

Find the [web] section and modify these settings:

[web]
    bind to = 127.0.0.1
    allow connections from = localhost 127.0.0.1 YOUR_IP_ADDRESS
    allow management from = 127.0.0.1

Replace YOUR_IP_ADDRESS with your actual IP address or CIDR block. This restricts dashboard access to localhost and your specified IP.

For additional security, enable basic authentication by creating a credentials file:

sudo htpasswd -c /etc/netdata/netdatapasswd admin

Enter a strong password when prompted. Then add this line to the [web] section:

    web files group = netdata
    web files owner = netdata

Restart Netdata to apply the changes:

sudo systemctl restart netdata

Set Up Reverse Proxy Access with Nginx

Running Netdata on port 19999 isn't ideal for production environments. Setting up a reverse proxy with Nginx provides better security and SSL termination.

If you don't have Nginx installed:

sudo apt install nginx -y

Create a new virtual host configuration for Netdata:

sudo nano /etc/nginx/sites-available/netdata

Add this configuration:

upstream netdata {
    server 127.0.0.1:19999;
    keepalive 64;
}

server {
    listen 80;
    server_name monitoring.yourdomain.com;

    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 the site and restart Nginx:

sudo ln -s /etc/nginx/sites-available/netdata /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Now you can access Netdata through your domain name on standard HTTP port 80. For SSL setup, use the same approach as our Nginx SSL configuration tutorial.

Configure Performance Monitoring Alerts

Netdata includes a powerful alerting system that can notify you before problems become critical. The default alerts cover most common issues, but you can customize them for your specific needs.

Alert configurations live in the /etc/netdata/health.d/ directory. Create a custom alert file:

sudo nano /etc/netdata/health.d/custom_vps_alerts.conf

Add these essential VPS monitoring alerts:

# High CPU usage alert
template: cpu_usage_high
      on: system.cpu
    calc: $user + $system
   every: 10s
    warn: $this > 80
    crit: $this > 95
   units: %
    info: CPU usage is high

# Low memory alert
template: memory_usage_high
      on: system.ram
    calc: ($used * 100) / ($used + $free)
   every: 10s
    warn: $this > 85
    crit: $this > 95
   units: %
    info: Memory usage is high

# Disk space alert
template: disk_space_usage
      on: disk_space._
    calc: $used * 100 / ($avail + $used)
   every: 60s
    warn: $this > 85
    crit: $this > 95
   units: %
    info: Disk space usage is high

These alerts trigger warnings at 80-85% resource usage and critical alerts at 95%+. Adjust the thresholds based on your VPS specifications and workload patterns.

To enable email notifications, edit the main configuration:

sudo nano /etc/netdata/netdata.conf

Find the [health] section and configure email settings:

[health]
    enabled = yes
    default repeat warning = never
    default repeat critical = 300

Install and configure the mail system:

sudo apt install mailutils -y

Test the alert system by creating a temporary high CPU load:

yes > /dev/null &
# Let it run for a minute, then kill it
kill %1

Monitor VPS Performance with Netdata Dashboard

Understanding which metrics matter most helps you identify performance bottlenecks quickly. Netdata tracks hundreds of metrics, but these are the critical ones for VPS monitoring.

CPU Metrics: Watch for sustained high CPU usage (>80%) and high load averages. The load average should typically stay below the number of CPU cores.

Memory Metrics: Track both RAM usage and swap activity. High swap usage indicates memory pressure that will slow your applications.

Disk I/O Metrics: Track both read/write operations per second and I/O wait time. High I/O wait suggests disk bottlenecks.

Network Metrics: Watch bandwidth usage and packet rates. Sudden spikes might indicate DDoS attacks or runaway processes.

The Netdata dashboard organizes these metrics into logical groups. The "System Overview" section provides a quick health check, while individual subsections offer detailed breakdowns. For VPS environments, pay special attention to the "Applications" section. This shows resource usage by individual processes, helping you identify which applications consume the most resources.

Integrate with Existing VPS Management Workflows

Netdata works best when integrated with your existing server management processes. This means connecting it to your backup monitoring, security scanning, and deployment workflows.

Many Hostperl customers combine Netdata monitoring with Fail2ban security monitoring and automated backup systems. This creates comprehensive visibility across all critical server functions.

You can export Netdata metrics to external systems using its API. For example, to get current CPU usage:

curl -s "http://localhost:19999/api/v1/data?chart=system.cpu&after=-60&format=json"

This flexibility allows integration with custom scripts, external monitoring platforms, or automated response systems. Consider setting up a dedicated monitoring subdomain for each VPS you manage. This approach scales well as you add more servers to your infrastructure.

Proper VPS monitoring is essential for maintaining reliable hosting performance. Hostperl's managed VPS hosting includes built-in monitoring and alerting, so you can focus on your applications rather than server management. Our New Zealand-based support team helps with monitoring setup, performance optimization, and 24/7 incident response.

Frequently Asked Questions

How much resources does Netdata consume on a VPS?

Netdata typically uses 1-3% CPU and 50-100MB RAM on most VPS configurations. The exact usage depends on the number of metrics collected and retention settings. For resource-constrained VPS instances, you can reduce the collection frequency or disable unused plugins.

Can I monitor multiple VPS servers from one Netdata instance?

Yes, Netdata supports a parent-child architecture where one central instance collects data from multiple child nodes. This is useful for managing several VPS servers from a single dashboard. Configure child nodes to stream data to the parent using the streaming configuration.

How long does Netdata retain historical performance data?

By default, Netdata keeps one hour of per-second data and 24 hours of per-minute data. You can extend retention by configuring the database engine settings, but this increases disk usage. For long-term storage, consider exporting data to external time-series databases.

Is Netdata suitable for production VPS monitoring?

Yes, Netdata is designed for production use and runs on millions of servers worldwide. The lightweight agent has minimal performance impact, and the real-time capabilities make it excellent for troubleshooting performance issues. Many hosting providers, including Hostperl, rely on Netdata for infrastructure monitoring.

How do I troubleshoot Netdata installation issues on Ubuntu?

Common issues include firewall blocking port 19999, insufficient system resources, or missing dependencies. Check the installation log at /tmp/netdata-kickstart.log for detailed error messages. Ensure your VPS has at least 1GB RAM and that required ports are open in your firewall configuration.