Installing Netdata on Ubuntu and Configuring a Monitoring Cluster

Installation

Prerequisites

First, install the required dependencies. These packages enable system monitoring and support for various applications including MySQL/MariaDB, PostgreSQL, DNS (named), hardware sensors, and SNMP.

Run the automated dependency installer:

curl -Ss 'https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh' >/tmp/install-required-packages.sh && bash /tmp/install-required-packages.sh -i netdata

To install all optional dependencies for comprehensive monitoring:

curl -Ss 'https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh' >/tmp/install-required-packages.sh && bash /tmp/install-required-packages.sh -i netdata-all

If the automated script fails, install dependencies manually. For Ubuntu/Debian:

apt-get install zlib1g-dev uuid-dev libuv1-dev liblz4-dev libjudy-dev libssl-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl python cmake

For Fedora:

dnf install zlib-devel libuuid-devel libuv-devel lz4-devel Judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils python cmake

For CentOS/RHEL:

yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-devel libuv-devel lz4-devel Judy-devel make nc pkgconfig python zlib-devel cmake

Building from Source

Create a directory for the Netdata source code:

mkdir -p /opt/netdata
cd /opt/netdata

Clone the repository:

git clone https://github.com/netdata/netdata.git --depth=1

Run the installer:

cd netdata
./netdata-installer.sh

The installer will display the installation paths:

  It will be installed at these locations:

   - the daemon    at /usr/sbin/netdata
   - config files  at /etc/netdata
   - web files     at /usr/share/netdata
   - plugins       at /usr/libexec/netdata
   - cache files   at /var/cache/netdata
   - db files      at /var/lib/netdata
   - log files     at /var/log/netdata
   - pid file      at /var/run

After installation completes successfully, access the dashboard at http://your-server-ip:19999.

Service Management Commands:

service netdata start
service netdata stop
service netdata restart

Cluster Configuration

To monitor multiple servers, configure one host as the central node and others as streaming agents.

Agent Node Configuraton

Edit /etc/netdata/netdata.conf:

[global]
    memory mode = none
    hostname = agent-node-01

[web]
    mode = none

[health]
    enabled = no

Create /etc/netdata/stream.conf:

[stream]
    enabled = yes
    destination = 192.168.1.100:19999
    api key = a1b2c3d4-e5f6-7890-abcd-ef1234567890

Generate a unique API key using:

uuidgen

Replace destination with your central node's IP address and api key with your generated UUID.

Central Node Configuration

Edit /etc/netdata/netdata.conf:

[global]
    hostname = monitoring-hub

Create /etc/netdata/stream.conf:

[8f14e45f-ceea-467a-9578-19c2be7e4e51]
    enabled = yes
    default history = 3600
    default memory mode = save
    health enabled by default = auto
    allow from = *

The UUID 8f14e45f-ceea-467a-9578-19c2be7e4e51 must match the api key configured in each agent node. Add additional sections for each agent using their respective API keys.

Restart Services

After completing both configurations, restart Netdata on all nodes:

systemctl restart netdata

The central node will now receive metrics from all connetced agent nodes, providing a unified view of your infrastructure.

Tags: netdata Ubuntu monitoring cluster streaming

Posted on Thu, 02 Jul 2026 17:10:40 +0000 by myleow