Monday, March 23, 2026

Linux | Install and Configure Netdata Monitoring on RHEL 10 / Rocky Linux 10

 Install and Configure Netdata Monitoring on RHEL 10 / Rocky Linux 10

Since today is March 23, 2026, staying updated with the latest monitoring tools like Netdata v2.9.0 is a smart move for your infrastructure. While Zabbix is great for long-term trends and alerts, Netdata is unbeatable for "per-second" real-time troubleshooting.

Netdata Real-Time Monitoring Guide

  • Core Capability: Netdata is a lightweight, high-performance tool that collects thousands of metrics per second with zero-configuration, providing an instant, interactive dashboard.

  • System Support: It runs efficiently on RHEL 10, Rocky Linux 10, AlmaLinux 10, FreeBSD, macOS, and Kubernetes.

  • Key Installation Steps:

    • Kickstart Installation: Uses a single-line script for rapid deployment.

    • Dashboard & Alarms: Out-of-the-box health checks and visual data representation.

    • Application Monitoring: Automatically detects and monitors web servers, databases, and containers.

    • Security & Access: Configuration includes firewall rules and securing the dashboard using an Nginx Reverse Proxy.

System Requirements & Preparation

  • OS & Hardware: A server running RHEL 10, Rocky Linux 10, or AlmaLinux 10 with at least 1 CPU core and 1 GB RAM.

  • Connectivity: A stable internet connection is required for the kickstart installation and package downloads.

  • Security & Networking: * Port 19999/TCP: Must be open to access the native Netdata dashboard.

    • Ports 80/443: Should be used if you follow the recommended path of setting up an Nginx reverse proxy for better security.

  • Access: Root or sudo privileges are mandatory for the installation and configuration of system alarms.

Step 1. Install Netdata on RHEL 10 / Rocky Linux 10
Netdata provides a kickstart script that detects your distribution and installs the appropriate packages automatically. This is the officially recommended installation method. Run the following command as root or with sudo:

wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --dont-wait

 The --dont-wait flag skips the confirmation prompt. If you prefer curl over wget:

curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --dont-wait

The installer downloads dependencies, compiles Netdata if needed, and sets up the systemd service. Once installation finishes, you should see a summary confirming Netdata is installed:
Successfully installed netdata
 --- You can now access Netdata at http://localhost:19999
Verify the installed version:
netdata -v
This should return the current version:
netdata v2.9.0
Step 2. Start and Enable Netdata Service
The kickstart script usually starts Netdata automatically, but confirm the service is running and enabled to survive reboots:
sudo systemctl enable --now netdata
Check the service status to verify it is active and running:
sudo systemctl status netdata
The output should show active (running) with the main PID and memory usage:
● netdata.service - Real time performance monitoring
     Loaded: loaded (/usr/lib/systemd/system/netdata.service; enabled; preset: disabled)
     Active: active (running) since Sat 2026-03-22 10:15:32 UTC; 5s ago
   Main PID: 12345 (netdata)
      Tasks: 45 (limit: 23456)
     Memory: 120.4M
        CPU: 2.134s
     CGroup: /system.slice/netdata.service
Step 3. Access the Netdata Dashboard
Netdata serves its web dashboard on port 19999 by default. Open your browser and navigate to:
http://your-server-ip:19999

Replace your-server-ip with your server’s actual IP address – for example, http://192.168.1.50:19999. The dashboard loads instantly and starts displaying real-time metrics with per-second granularity. You will see system overview charts for CPU, memory, disk I/O, and network traffic right on the landing page.

If the dashboard does not load, check that the firewall allows port 19999 (covered in Step 8) and that the Netdata service is running.

Step 4. Configure Netdata

The main Netdata configuration file is /etc/netdata/netdata.conf. This file controls the agent’s behavior including data retention, memory usage, listening address, and update frequency. The recommended way to edit it is through the built-in editor script:
sudo /etc/netdata/edit-config netdata.conf
Key settings you may want to adjust in the (global) section:
[global]
    # Change the default listening port (default: 19999)
    default port = 19999

    # Bind to a specific IP (default: all interfaces)
    bind to = 0.0.0.0

    # Data collection frequency in seconds (default: 1)
    update every = 1

    # History length in seconds - 3600 = 1 hour of data at 1-second granularity
    history = 3600
For production servers that need longer retention, increase the history value. Setting it to 86400 retains 24 hours of per-second data but uses more RAM. Alternatively, configure the database engine mode for disk-based storage in the [db] section:
[db]
    # dbengine stores data on disk, allowing much longer retention
    mode = dbengine

    # Disk space limit in MB for tier 0 (per-second data)
    dbengine multihost disk space MB = 1024
After making changes, restart Netdata to apply:
sudo systemctl restart netdata

Step 5. Monitor System Metrics

Netdata provides a zero-configuration, high-fidelity monitoring dashboard that updates every second. It categorizes system health into four critical sections:

  • CPU: Tracks per-core usage, system/user time, and Steal time (vital for identifying VM resource contention).

  • Memory: Offers a granular breakdown of RAM (Used, Cached, Free), Swap usage, and kernel memory health.

  • Disk I/O: Monitors throughput, IOPS, and latency, which is essential for database performance (like your GlobalTVBD SQL backend).

  • Network: Visualizes bandwidth, packets per second, and TCP connection states to identify network saturation or potential attacks.

Key Feature: Netdata includes an integrated time-picker for anomaly investigation and can export data to Prometheus/Grafana for long-term storage and advanced visualization.

Step 6. Configure Alarms and Notifications

Netdata ships with hundreds of pre-configured health alarms covering CPU usage, memory pressure, disk space, network errors, and more. Alarm configuration files live in /etc/netdata/health.d/. List the available alarm definitions:
ls /etc/netdata/health.d/
To create a custom alarm – for example, alert when disk space on the root partition drops below 20% – edit or create a health config:
sudo /etc/netdata/edit-config health.d/disk_space_custom.conf
Add the following alarm definition:
alarm: disk_space_root_low
    on: disk.space
lookup: average -1m percentage of used
 every: 1m
  warn: $this > 80
  crit: $this > 90
  info: Root disk space usage is high
This triggers a warning when disk usage exceeds 80% and a critical alert above 90%. After adding the alarm, reload the health configuration without restarting Netdata:
sudo netdatacli reload-health
To view current active alarms from the command line:
curl -s http://localhost:19999/api/v1/alarms | python3 -m json.tool | head -50
For email notifications, configure the alarm notification settings:
sudo /etc/netdata/edit-config health_alarm_notify.conf
Set the email recipient and sender in the notification config:
# Enable email notifications
SEND_EMAIL="YES"

# Default recipient for all alarms
DEFAULT_RECIPIENT_EMAIL="admin@example.com"

# Sender address
EMAIL_SENDER="netdata@example.com"
Netdata also supports notifications through Slack, PagerDuty, Telegram, Discord, and many other platforms. Check the Netdata configuration documentation for all available notification methods.

Step 7. Monitor Applications – MySQL, Nginx, Docker
Netdata auto-detects many running applications and starts collecting metrics from them. For services that require authentication or custom endpoints, you need to configure the corresponding collector.

Monitor MySQL / MariaDB
Netdata uses the go.d/mysql collector. Create a MySQL user for Netdata:
mysql -u root -p
Run these SQL statements to create a read-only monitoring user:
CREATE USER 'netdata'@'localhost' IDENTIFIED BY 'StrongPassword123';
GRANT USAGE, REPLICATION CLIENT, PROCESS ON *.* TO 'netdata'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Then configure the MySQL collector:
sudo /etc/netdata/edit-config go.d/mysql.conf
Add the connection details:
jobs:
  - name: local_mysql
    dsn: netdata:StrongPassword123@tcp(127.0.0.1:3306)/
Restart Netdata to pick up the new collector config. The dashboard will show MySQL metrics including queries per second, connections, buffer pool usage, and replication lag.

Monitor Nginx
Netdata monitors Nginx through the stub_status module. Enable the status endpoint in your Nginx configuration by adding a server block or location:
sudo vi /etc/nginx/conf.d/stub_status.conf
Add this server block:
server {
    listen 127.0.0.1:80;
    server_name 127.0.0.1;

    location /stub_status {
        stub_status;
        allow 127.0.0.1;
        deny all;
    }
}
Reload Nginx and Netdata will auto-detect the status endpoint. You will see active connections, requests per second, and connection states in the dashboard.

Monitor Docker Containers
Netdata monitors Docker containers automatically when it has access to the Docker socket. Add the netdata user to the docker group:
sudo usermod -aG docker netdata
sudo systemctl restart netdata
After restarting, Netdata displays per-container metrics including CPU usage, memory consumption, network I/O, and block I/O. Each container appears as a separate section in the dashboard.

Step 8. Configure Firewall for Netdata
RHEL 10 and Rocky Linux 10 use firewalld by default. Open port 19999/TCP to access the Netdata dashboard from remote machines. If you plan to use an Nginx reverse proxy (Step 9), you can skip this and open only ports 80/443 instead.

To allow direct access to the Netdata dashboard on port 19999:
sudo firewall-cmd --permanent --add-port=19999/tcp
sudo firewall-cmd --reload
Verify the port is open in the firewalld configuration:
sudo firewall-cmd --list-ports
The output should include 19999/tcp in the active ports list:
19999/tcp
Step 9. Secure Netdata with Nginx Reverse Proxy
Running Netdata behind an Nginx reverse proxy adds TLS encryption and basic authentication. This is the recommended setup for production servers where the dashboard is exposed beyond the local network.

First, install Nginx and the httpd-tools package for password file generation:
sudo dnf install -y nginx httpd-tools
Create a password file for basic authentication:
sudo htpasswd -c /etc/nginx/.htpasswd netdata_admin
Enter a strong password when prompted. Next, bind Netdata to localhost only so it is not directly accessible from the network. Edit the Netdata config:
sudo /etc/netdata/edit-config netdata.conf
Set the bind address to localhost in the [web] section:
[web]
    bind to = 127.0.0.1
Restart Netdata to apply the binding change:
sudo systemctl restart netdata
Create the Nginx virtual host configuration for Netdata:
sudo vi /etc/nginx/conf.d/netdata.conf
Add the following reverse proxy configuration. Replace netdata.example.com with your actual domain or server IP:
upstream netdata_backend {
    server 127.0.0.1:19999;
    keepalive 64;
}

server {
    listen 80;
    server_name netdata.example.com;

    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_backend;
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
    }
}
Test the Nginx configuration and start the service:
sudo nginx -t
sudo systemctl enable --now nginx
Open HTTP and HTTPS ports in the firewall and remove the direct Netdata port if you opened it earlier:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --remove-port=19999/tcp
sudo firewall-cmd --reload
Access the dashboard through the proxy at http://netdata.example.com. The browser will prompt for the username and password you created with htpasswd. For TLS, add a certificate from Let’s Encrypt or your preferred CA to the Nginx server block.

Step 10: Connect to Netdata Cloud

Netdata Cloud is a free service that provides a centralized dashboard for monitoring multiple Netdata agents across different servers. It does not store your metrics – the data stays on your servers. Netdata Cloud provides a unified view, cross-server correlation, and role-based access control.

If you did not connect during installation, claim the agent to your Netdata Cloud account:

  • Sign up or log in at app.netdata.cloud
  • Create a Space and a Room (or use the defaults)
  • Click “Connect Nodes” and copy the claiming command

The claiming command looks like this (use the exact token from your Netdata Cloud account):

sudo netdata-claim.sh -token=YOUR_CLOUD_TOKEN -rooms=YOUR_ROOM_ID -url=https://app.netdata.cloud
After claiming, the agent appears in your Netdata Cloud dashboard within a few seconds. You can now monitor this server alongside all your other Netdata nodes from a single interface. Netdata Cloud also provides composite charts that aggregate metrics from multiple servers – useful for monitoring clusters.

To verify the agent is connected, check the claiming status:
sudo netdatacli aclk-state
The output should show ACLK state: online if the connection to Netdata Cloud is active. If you run Netdata with Grafana, you can also export Netdata metrics to Grafana dashboards for custom visualization.

Closure:

Netdata is successfully deployed on your RHEL 10 / Rocky Linux 10 server, providing real-time system and container monitoring. To ensure it is production-ready, follow these final hardening steps:

  • Security: Use an Nginx Reverse Proxy with Basic Auth to protect the dashboard. Add TLS certificates (SSL) for encrypted access.

  • Performance: Tune the dbengine settings to balance your data retention needs with your available disk space.

  • Scalability: Integrate with Prometheus for long-term historical data storage.

  • Proactive Care: Enable Alarm Notifications (Email/Telegram) to catch performance spikes before they impact your users.

No comments:

Post a Comment