Skip to main content

17: Netdata - Real-time Performance Monitoring

Netdata is a powerful, real-time monitoring tool that shows you exactly what's happening on your server right now. It displays beautiful graphs of CPU, memory, disk, network, and Docker containers - updating every single second! Think of it as a real-time health dashboard for your entire server.

For advanced features, API documentation, and customization options, see the official Netdata documentation.

Why Netdata?

  • Real-time monitoring - See updates every second, not every minute
  • Beautiful graphs - Colorful, easy-to-read charts for everything
  • Zero configuration - Works immediately after installation
  • Auto-discovery - Automatically finds and monitors all Docker containers
  • Low resource usage - Uses only ~50MB of RAM
  • Comprehensive metrics - CPU, RAM, disk, network, processes, and more
  • Alert notifications - Get notified when something goes wrong
  • Historical data - See trends over time

Prerequisites

  • Docker running (from Chapter 3)
  • Optional: Traefik installed (from Chapter 4) for HTTPS access with a domain
  • Optional: Subdomain (from Chapter 4.5), e.g., monitor.yourdomain.com
  • Optional: Apprise installed (from Chapter 5) for alert notifications

Note: Netdata works great with Traefik and a domain name. Having a friendly URL like monitor.yourdomain.com makes it easy to access your monitoring dashboard.

Step 1: Start Infinity Tools

sudo infinity-tools

Step 2: Install Netdata

  1. Go to 📱 APPLICATIONS
  2. Select Netdata
  3. Choose Install Netdata

Using the Infinity Tools GUI

  • Use ↑/↓ to move, Enter to select, Esc to go back
  • Look for the turquoise cursor indicating the current selection
  • Each screen shows a short description at the top explaining what's needed

Step 2.1: Choose SSL Mode

You'll see two options. Here's what each means:

  • Traefik (recommended)
    • What it is: Uses your domain name with a trusted HTTPS certificate from Let's Encrypt
    • What you need: A subdomain (e.g., monitor.yourdomain.com) pointing to your server (see Chapter 4.5)
    • What you get: Professional URL like https://monitor.yourdomain.com with trusted SSL
    • Pick this if: You want secure, easy access with a domain name (recommended)
  • Standalone HTTP
    • What it is: Uses HTTP with direct port access (no SSL)
    • What you need: Just a free port (default: 19999)
    • What you get: URL like http://SERVER_IP:19999
    • Pick this if: You're just testing or only using it on your local network

Simple rule of thumb: Use Traefik if you have a domain and want secure access. Use Standalone HTTP only for testing or private use.

Step 2.2: If You Choose Traefik

  1. Enter your subdomain, e.g., monitor.yourdomain.com
  2. Ensure the subdomain's DNS A record points to your server (see Chapter 4.5)
  3. Infinity Tools will configure HTTPS automatically via Let's Encrypt

After install: Your Netdata will be available at https://monitor.yourdomain.com

Step 2.3: If You Choose Standalone

  1. Pick a port (default: 19999)
  2. You'll access Netdata via http://SERVER_IP:19999

Step 2.4: Multi-Server Monitoring (Optional)

You'll be asked if you want to stream metrics to a Netdata Director (parent server):

  • Yes
    • What it does: Sends all metrics to a central dashboard
    • What you need: A Netdata Director server already set up
    • What you get: Centralized monitoring of multiple servers
    • Pick this if: You have multiple servers and want one dashboard for all
  • No (default)
    • What it does: Standalone monitoring (this server only)
    • Pick this if: You're just monitoring one server

Step 2.5: Apprise Notifications (Optional)

If you have Apprise installed (Chapter 5), you can enable alert notifications:

  • Yes
    • What it does: Sends alerts to Apprise when CPU, RAM, or disk usage is high
    • What you get: Notifications via Discord, Slack, Email, etc. (all Apprise services)
    • Pick this if: You want to get alerts when something goes wrong
  • No
    • What it does: No alert notifications
    • Pick this if: You just want to view metrics, no alerts

What Happens During Installation

  • Netdata container is created
  • Data directories are set up at /opt/speedbits/netdata-client
  • Optional domain + Traefik HTTPS routing (if using Traefik)
  • Docker socket access configured (for container monitoring)
  • Custom alerts configured (CPU, RAM, disk)
  • Optional Apprise integration (if enabled)
  • Service starts and becomes accessible

Step 3: Access Netdata

If Using Traefik

  1. Wait 30-60 seconds for SSL certificate generation
  2. Open https://monitor.yourdomain.com in your browser
  3. You'll see the Netdata dashboard immediately!

If Using Standalone

  1. Open http://SERVER_IP:19999 in your browser
  2. You'll see the Netdata dashboard immediately!

⚠️ IMPORTANT SECURITY NOTE: Netdata has NO username/password protection by default! Anyone who can access the URL can see your monitoring data. If using Traefik, strongly consider adding Basic Auth protection. If using standalone mode, keep it on a private network only!

Step 4: Understanding the Dashboard

When you first open Netdata, you'll see a beautiful dashboard with lots of graphs. Here's what everything means:

Main Sections

  • 📊 System Overview - CPU, RAM, disk, network at a glance
  • 🐳 Docker Containers - All your containers with individual metrics
  • 💾 Disk I/O - How fast your disks are reading/writing
  • 🌐 Network - Network traffic and connections
  • ⚙️ System Load - How busy your server is
  • 📈 Processes - Individual programs and their resource usage

Reading the Graphs

  • Green - Normal, healthy values
  • Yellow - Warning (getting high)
  • Red - Critical (too high!)
  • Time axis - Shows last hour by default (can zoom in/out)
  • Real-time - Updates every second automatically

Key Metrics to Watch

  • 💻 CPU Usage - Should be under 80% most of the time
  • 🧠 RAM Usage - Should be under 80% most of the time
  • 💾 Disk Usage - Should be under 80% (watch for low disk space!)
  • 🌐 Network Traffic - Shows incoming/outgoing data
  • 🐳 Container Status - All containers should be running

Step 5: Docker Container Monitoring

One of Netdata's best features is automatic Docker container discovery and monitoring!

What You'll See

  • All your Docker containers listed automatically
  • Individual CPU, RAM, disk, and network usage for each container
  • Container health status
  • Real-time graphs for each container

How to Use It

  1. Click on "Docker" in the left sidebar
  2. You'll see all your containers listed
  3. Click on any container to see its detailed metrics
  4. Watch for containers using too much CPU or RAM

Step 6: Alert Notifications (If Enabled)

If you enabled Apprise notifications, Netdata will automatically send alerts when:

  • ⚠️ CPU usage > 80% (warning) or > 95% (critical)
  • ⚠️ RAM usage > 80% (warning) or > 95% (critical)
  • ⚠️ Disk space > 80% (warning) or > 90% (critical)

How Alerts Work

  1. Netdata detects a problem (e.g., CPU too high)
  2. Sends alert to Apprise
  3. Apprise forwards to your configured channels (Discord, Slack, Email, etc.)
  4. You get notified immediately!

Customizing Alerts

You can customize alert thresholds by editing configuration files:

nano /opt/speedbits/netdata-client/netdata/health.d/cpu_usage.conf

Change the warning/critical thresholds to your preferences.

Security Recommendations

  • Use Traefik mode - Provides trusted SSL certificates
  • Add Basic Auth - Protect dashboard with username/password (strongly recommended!)
  • Private network only - If using standalone mode, don't expose to internet
  • Use VPN - Access via WireGuard VPN (Chapter 18) for secure remote access
  • SSH tunnel - Use SSH tunnel for secure access: ssh -L 19999:localhost:19999 user@server
  • ⚠️ No default protection - Netdata has NO username/password by default - protect it!

Adding Basic Auth Protection

If using Traefik, you can add username/password protection:

  1. Run: sudo bash Infrastructure/websiteprotection.sh
  2. Select "netdata"
  3. Enter username and password
  4. Now your dashboard is protected!

Troubleshooting

Can't Access Netdata

  • Traefik mode: Wait 30-60 seconds after installation for SSL certificate generation
  • Check containers: Run docker ps | grep netdata to see if container is running
  • Check logs: Run docker logs netdata to see error messages

No Docker Containers Showing

  • Make sure Docker is running: docker ps
  • Check that Docker socket is accessible: docker exec netdata ls /var/run/docker.sock
  • Restart Netdata: docker restart netdata

Alerts Not Working

  • Check that Apprise is running: docker ps | grep apprise
  • Verify Apprise network connectivity
  • Check Netdata logs: docker logs netdata
  • Test alert thresholds (trigger a test alert)

High Resource Usage

  • Netdata uses ~50MB RAM (very low!)
  • If seeing high CPU, check how many containers you're monitoring
  • Consider reducing data retention period

Where to Find Netdata After Install

  • On the finish screen, Infinity Tools prints the access URL
  • You can also see it in 📊 STATUS & HEALTH → STATUS
  • Check the installation directory: /opt/speedbits/netdata-client
  • Configuration files: /opt/speedbits/netdata-client/netdata/

Useful Features

Historical Data

Netdata stores historical data so you can see trends over time:

  • Zoom in/out on graphs to see different time periods
  • Compare current vs. past performance
  • Identify patterns and trends

Exporting Data

You can export graphs and data:

  • Click on any graph to see export options
  • Export as image (PNG)
  • Share graphs with others

Custom Dashboards

Netdata allows you to create custom dashboards:

  • Focus on specific metrics
  • Create views for different purposes
  • Save favorite views

You're Ready!

Netdata is now installed and monitoring your server in real-time! Remember:

  • 🔐 Protect your dashboard with Basic Auth (strongly recommended!)
  • 📊 Check the dashboard regularly to understand your server's health
  • 🔔 Set up alerts to get notified of problems
  • 🐳 Use Docker monitoring to track container health
  • 📈 Use historical data to identify trends and plan capacity

Next steps: Explore the dashboard, check your Docker containers, set up alerts, and use Netdata to keep your server running smoothly!