Install Netdata on CentOS / Red Hat Enterprise Linux (RHEL) 8 - CentLinux


Wednesday, 26 January 2022

Install Netdata on CentOS / Red Hat Enterprise Linux (RHEL) 8

Install Netdata on CentOS / Red Hat Enterprise Linux (RHEL) 8

Step by Step guide to install Netdata on CentOS / Red Hat Enterprise Linux (RHEL) 8 or similar Linux distros.


Table of Contents:


What is Netdata?:

Netdata is an open source tool designed to collect real-time metrics, such as CPU usage, disk activity, bandwidth usage, website visits, etc., and then display them in live, easy-to-interpret charts.

The tool is designed to visualize activity in the greatest possible detail, allowing the user to obtain an overview of what is happening and what has just happened in their system or application.

Netdata consists of a daemon that, when executed, is responsible for collecting and displaying information in real-time.

It is a lightweight tool, mostly written in C, Python, and JavaScript, which uses minimal resources: about 2% on a single-CPU system.

It can be run in any Linux system to monitor any system or application, and is capable of running on PCs, servers, and embedded Linux devices. (Source: Wikipedia)

Install Netdata on CentOS / Red Hat Enterprise Linux (RHEL) 8

Netdata Features:

Netdata is designed to be installed on a system without interrupting any of the applications running on it. It operates according to the memory requirements specified by the user, using only idle CPU cycles. Once the application begins, it will not perform disk I/O beyond logging. The tool saves to disk at the end of its execution and reloads at startup.

By default it contains certain plugins that collect key system metrics, but its behavior is extensible by using its plugin API.

Netdata can be run on virtually anything utilizing a Linux kernel and its graphics can be embedded into web pages. It has an interface with customizable themes and can be manually configured by the user, through simple HTML.

There are no dependencies, as it operates as its own web server, with static web files.

Starting with v1.12, Netdata collects anonymous usage information by default and sends it to Google Analytics, a feature which can be disabled via manual configuration.


Environment Specification:

We are using a minimal Red Hat Enterprise Linux 8 virtual machine with following specifications.

  • CPU - 3.4 Ghz (2 cores)
  • Memory - 2 GB
  • Storage - 20 GB
  • Operating System - Red Hat Enterprise Linux 8.5
  • Hostname –
  • IP Address - /24


Update Linux Operating System:

By using a ssh client, connect with as root user.

Rebuild cache of enabled yum repositories.

# dnf makecache
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  3.2 kB/s | 4.1 kB     00:01
Red Hat CodeReady Linux Builder for RHEL 8 x86_ 4.9 kB/s | 4.5 kB     00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStre 5.4 kB/s | 4.5 kB     00:00
Metadata cache created.

Update your Linux operating system by executing following command.

# dnf update -y

The above command may updates your Linux Kernel. In this case, you should reboot your Linux server with newly installed Linux Kernel.

# reboot

Check the Linux operating system and Kernel versions.

# uname -r

# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"
PRETTY_NAME="Red Hat Enterprise Linux 8.5 (Ootpa)"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"


Install Third Party Yum Repositories:

Netdata software requires some packages that are not available in standard yum repositories. Therefore, you are required to install a few third party yum repositories on your Linux server.

First of all, install EPEL (Extra Packages for Enterprise Linux) yum repository by executing following command.

# dnf install -y

You also need to enable PowerTools repository.

For CentOS / Rocky Linux you can execute following command to enable PowerTools repository.

# dnf install -y 'dnf-command(config-manager)'
# dnf -y config-manager --set-enabled PowerTools

Whereas, for RHEL, execute the following command.

# subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
1 local certificate has been deleted.
Repository 'codeready-builder-for-rhel-8-x86_64-rpms' is enabled for this system.
Build cache for newly installed yum repositories.

You may also required to add Okay yum repository, Because some of the Netdata required packages are provided thereby.

# dnf install -y

After installing Okay repository, you may need to edit the okay.repo file to make it usable.

Edit okay.repo by using vim text editor.

# vi /etc/yum.repos.d/okay.repo

Locate following lines therein.


And amend them as follows.


Remove any cached packages from the Linux operating system.

# dnf clean packages
Updating Subscription Management repositories.
89 files removed

Update Okay repository as follows.

# dnf update -y okay-release

Edit the okay.repo file again. Because, the update process also remove the changes that you have made in previous steps.

# vi /etc/yum.repos.d/okay.repo

Locate and comment following directive in this file.


Build cache for newly installed yum repositories.

# dnf makecache
Updating Subscription Management repositories.
Extra Packages for Enterprise Linux 8 - x86_64   32 kB/s |  18 kB     00:00
Extra Packages for Enterprise Linux Modular 8 -  32 kB/s |  18 kB     00:00
Extra OKay Packages for Enterprise Linux - x86_ 150 kB/s | 4.3 MB     00:29
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  4.4 kB/s | 4.1 kB     00:00
Red Hat CodeReady Linux Builder for RHEL 8 x86_ 3.3 kB/s | 4.5 kB     00:01
Red Hat Enterprise Linux 8 for x86_64 - AppStre 6.1 kB/s | 4.5 kB     00:00


Install Netdata Prerequisites:

Since, you have already setup the required yum repositories, therefore, you can easily install Netdata prerequisites packages on your Linux server by executing following command.

# dnf install -y autoconf automake curl gcc git cmake libuuid-devel openssl-devel libuv-devel lz4-devel make nc pkgconfig python3 zlib-devel gcc-c++ libbpf-devel

Netdata also requires Judy-devel package from Okay yum repository. But it's installation is little bit tricky.

Judy is a dependency of Judy-devel package. But an older version of Judy package is also available in Red Hat Enterprise Linux (RHEL) Appstream repository.

Therefore, you need to disable the RHEL Appstream before install Judy-devel package.

# subscription-manager repos --disable rhel-8-for-x86_64-appstream-rpms
Repository 'rhel-8-for-x86_64-appstream-rpms' is disabled for this system.

Now install Judy-devel package as follows.

# dnf install -y Judy-devel

After successful installation of Judy-devel, enable the RHEL Appstream again.

# subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms
Repository 'rhel-8-for-x86_64-appstream-rpms' is enabled for this system.


Install Netdata on CentOS / RHEL 8:

Netdata is available to download at GitHub. Therefore, execute git command to clone Netdata repository.

# cd
# git clone --depth=100 --recursive

The Netdata software has been downloaded into netdata directory.

Now execute the Netdata installation script with following command switches, to install Netdata on your Linux server.

# cd netdata
# ./ --stable-channel --dont-wait --install /opt

  |.-.   .-.   .-.   .-.   .  netdata
  |   '-'   '-'   '-'   '-'   real-time performance monitoring, done right!

  You are about to build and install netdata to your system.

  The build process will use /tmp for
  any temporary files. You can override this by setting $TMPDIR to a
  writable directory where you can execute files.

  It will be installed at these locations:

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

  This installer allows you to change the installation path.
  Press Control-C and run the same command with --help for help.

  Anonymous usage stats will be collected and sent to Netdata.
  To opt-out, pass --disable-telemetry option to the installer or export
  the environment variable DO_NOT_TRACK to a non-zero or non-empty value
  (e.g: export DO_NOT_TRACK=1).
Memory de-duplication instructions

You have kernel memory de-duper (called Kernel Same-page Merging,
or KSM) available, but it is not currently enabled.

To enable it run:

    echo 1 >/sys/kernel/mm/ksm/run
    echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs

If you enable it, you will save 40-60% of netdata memory.

 --- Check version.txt ---
 --- Check apps.plugin ---
 --- Copy uninstaller ---
 --- Basic netdata instructions ---

netdata by default listens on all IPs on port 19999,
so you can access it with:


To stop netdata run:

  systemctl stop netdata

To start netdata run:

  systemctl start netdata

Uninstall script copied to: /opt/netdata/usr/libexec/netdata/

 --- Installing (but not enabling) the netdata updater tool ---
Failed to disable unit: Unit file netdata-updater.timer does not exist.
Update script is located at /opt/netdata/usr/libexec/netdata/

 --- Check if we must enable/disable the netdata updater tool ---
You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling)

 --- Wrap up environment set up ---
Preparing .environment file
[/root/netdata]# chmod 0644 /opt/netdata/etc/netdata/.environment

Setting netdata.tarball.checksum to 'new_installation'

 --- We are done! ---

  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'

  enjoy real-time performance and health monitoring...

Netdata software has been installed and the relevant network services has been started by the installation process.


Configure Linux Firewall:

Netdata software uses default service port 19999/tcp. Therefore, you may need to allow this port in Linux firewall to make it accessible across the network.

# firewall-cmd --permanent --add-port=19999/tcp
# firewall-cmd --reload


Access Netdata Web Application:

Open URL in a web browser.


You have reached at the dashboard of Netdata web application. It is now showing the performance statistics of your Linux server.


In this article, you have successfully learned how to install Netdata on CentOS / Red Hat Enterprise Linux 8 or similar Linux distros.

No comments:

Post a Comment