October 21, 2021
How to install Netdata on CentOS 8

How To Install Netdata Monitoring Tools On CentOS 8

On this tutorial, we will learn how to install Netdata version 1.31.0-245 monitoring tools on CentOS 8 operting system

Introduction

Netdata is a monitoring, visualization, and troubleshooting solution for systems, containers, services, and applications. By using Netdata, we will be helped in in monitoring systems in realtime and quickly picking up faults or errors and resolving them to ensure things get back on track. Netdata helps sysadmins, SREs, DevOps engineers, and IT professionals collect all possible metrics from systems and applications, visualize these metrics in real-time, and troubleshoot complex performance problems. On this tutorial we will learn how to install Netdata version 1.31.0-245 on CentOS 8 operating system.



Netdata Installation On CentOS 8

Netdata installation in CentOS 8 will be tricky, since some other dependencies are either missing completely or have to be sourced by 3rd-parties. To install Netdata on Centos 8, there are two steps that must be done, namely: prepare the system and install Netdata.

1. Preparing CentOS 8 System For Installing Netdata

Some steps to take are:

  • Enable the PowerTools repo
  • Enable the EPEL repo
  • Enable the Extra repo from OKAY

Here are minimum required dependencies to be installed :

1.1. Enable config-manager

[ramans@otodiginet ~]$ sudo yum install -y 'dnf-command(config-manager)'
[sudo] password for ramans: 
CentOS Linux 8 - AppStream                                                                              1.6 kB/s | 4.3 kB     00:02    
CentOS Linux 8 - AppStream                                                                              278 kB/s | 8.8 MB     00:32    
CentOS Linux 8 - BaseOS                                                                                 1.6 kB/s | 3.9 kB     00:02    
CentOS Linux 8 - BaseOS                                                                                 295 kB/s | 6.5 MB     00:22    
CentOS Linux 8 - Extras                                                                                 716  B/s | 1.5 kB     00:02    
MariaDB Server                                                                                          1.6 kB/s | 3.4 kB     00:02    
MariaDB MaxScale                                                                                        656  B/s | 2.5 kB     00:03    
MariaDB Tools                                                                                           1.6 kB/s | 2.9 kB     00:01    
Package dnf-plugins-core-4.0.18-4.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

1.2. Enable PowerTools

[ramans@otodiginet ~]$ sudo dnf config-manager --set-enabled powertools

1.3. Enable EPEL

[ramans@otodiginet ~]$ sudo dnf install -y epel-release
CentOS Linux 8 - PowerTools                                                                             170 kB/s | 2.3 MB     00:14    
Last metadata expiration check: 0:00:03 ago on Sun 12 Sep 2021 02:51:39 AM PDT.
Dependencies resolved.
========================================================================================================================================
 Package                             Architecture                  Version                          Repository                     Size
========================================================================================================================================
Installing:
 epel-release                        noarch                        8-11.el8                         extras                         24 k

Transaction Summary
========================================================================================================================================
Install  1 Package

Total download size: 24 k
Installed size: 35 k
Downloading Packages:
epel-release-8-11.el8.noarch.rpm                                                                         17 kB/s |  24 kB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                    10 kB/s |  24 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Installing       : epel-release-8-11.el8.noarch                                                                                   1/1 
  Running scriptlet: epel-release-8-11.el8.noarch                                                                                   1/1 
  Verifying        : epel-release-8-11.el8.noarch                                                                                   1/1 
Installed products updated.

Installed:
  epel-release-8-11.el8.noarch                                                                                                          

Complete!

1.4. Install Repo for libuv-devl (NEW)

[ramans@otodiginet ~]$ sudo dnf install -y http://repo.okay.com.mx/centos/8/x86_64/release/okay-release-1-3.el8.noarch.rpm
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                   28 kB/s | 939 kB     00:33    
Extra Packages for Enterprise Linux 8 - x86_64                                                          593 kB/s |  10 MB     00:17    
Last metadata expiration check: 0:00:06 ago on Sun 12 Sep 2021 02:55:02 AM PDT.
okay-release-1-3.el8.noarch.rpm                                                                         6.3 kB/s | 7.9 kB     00:01    
Dependencies resolved.
========================================================================================================================================
 Package                            Architecture                 Version                       Repository                          Size
========================================================================================================================================
Installing:
 okay-release                       noarch                       1-3.el8                       @commandline                       7.9 k

Transaction Summary
========================================================================================================================================
Install  1 Package

Total size: 7.9 k
Installed size: 1.4 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Installing       : okay-release-1-3.el8.noarch                                                                                    1/1 
  Running scriptlet: okay-release-1-3.el8.noarch                                                                                    1/1 
  Verifying        : okay-release-1-3.el8.noarch                                                                                    1/1 
Installed products updated.

Installed:
  okay-release-1-3.el8.noarch                                                                                                           

Complete!

1.5. Install Devel Packages

[ramans@otodiginet ~]$ sudo dnf install autoconf automake curl gcc git cmake libuuid-devel openssl-devel libuv-devel lz4-devel make nc pkgconfig python3 zlib-devel
Extra OKay Packages for Enterprise Linux - x86_64                                                       225 kB/s | 4.2 MB     00:19    
Last metadata expiration check: 0:00:04 ago on Sun 12 Sep 2021 02:55:45 AM PDT.
Package curl-7.61.1-18.el8.x86_64 is already installed.
Package gcc-8.4.1-1.el8.x86_64 is already installed.
Package make-1:4.2.1-10.el8.x86_64 is already installed.
Package nmap-ncat-2:7.70-5.el8.x86_64 is already installed.
Package pkgconf-pkg-config-1.4.2-1.el8.x86_64 is already installed.
Package python36-3.6.8-2.module_el8.4.0+790+083e3d81.x86_64 is already installed.
Dependencies resolved.
========================================================================================================================================
 Package                               Architecture             Version                              Repository                    Size
========================================================================================================================================
Installing:
 autoconf                              noarch                   2.69-27.el8                          appstream                    710 k
 automake                              noarch                   1.16.1-7.el8                         appstream                    713 k
 cmake                                 x86_64                   3.18.2-11.el8_4                      appstream                    9.8 M
 git                                   x86_64                   2.27.0-1.el8                         appstream                    164 k
 libuuid-devel                         x86_64                   2.32.1-27.el8                        baseos                        97 k
 libuv-devel                           x86_64                   1:1.41.1-1.el8_4                     powertools                    37 k
 lz4-devel                             x86_64                   1.8.3-3.el8_4                        baseos                        31 k
 openssl-devel                         x86_64                   1:1.1.1g-15.el8_3                    baseos                       2.3 M
 zlib-devel                            x86_64                   1.2.11-17.el8                        baseos                        58 k
Installing dependencies:
 cmake-data                            noarch                   3.18.2-11.el8_4                      appstream                    1.6 M
 cmake-filesystem                      x86_64                   3.18.2-11.el8_4                      appstream                     44 k
 cmake-rpm-macros                      noarch                   3.18.2-11.el8_4                      appstream                     44 k
 git-core                              x86_64                   2.27.0-1.el8                         appstream                    5.7 M
 git-core-doc                          noarch                   2.27.0-1.el8                         appstream                    2.5 M
 keyutils-libs-devel                   x86_64                   1.5.10-6.el8                         baseos                        48 k
 krb5-devel                            x86_64                   1.18.2-8.el8                         baseos                       559 k
 libcom_err-devel                      x86_64                   1.45.6-1.el8                         baseos                        38 k
 libkadm5                              x86_64                   1.18.2-8.el8                         baseos                       186 k
 libselinux-devel                      x86_64                   2.9-5.el8                            baseos                       200 k
 libsepol-devel                        x86_64                   2.9-2.el8                            baseos                        86 k
 libuv                                 x86_64                   1:1.41.1-1.el8_4                     appstream                    156 k
 libverto-devel                        x86_64                   0.3.0-5.el8                          baseos                        18 k
 m4                                    x86_64                   1.4.18-7.el8                         baseos                       223 k
 pcre2-devel                           x86_64                   10.32-2.el8                          baseos                       605 k
 pcre2-utf16                           x86_64                   10.32-2.el8                          baseos                       229 k
 pcre2-utf32                           x86_64                   10.32-2.el8                          baseos                       220 k
 perl-Error                            noarch                   1:0.17025-2.el8                      appstream                     46 k
 perl-Git                              noarch                   2.27.0-1.el8                         appstream                     77 k
 perl-TermReadKey                      x86_64                   2.37-7.el8                           appstream                     40 k
 perl-Thread-Queue                     noarch                   3.13-1.el8                           appstream                     24 k

Transaction Summary
========================================================================================================================================
Install  30 Packages

Total download size: 26 M
Installed size: 90 M
Is this ok [y/N]: y

1.6. Install Judy-Devel directly

[ramans@otodiginet ~]$ sudo yum install -y http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.1.0+217+4d875839.x86_64.rpm

2. Installing Netdata on CentOS 8

At this section, we will clone, build and install Netdata software.

2.1. Clone Netdata Repository

After all required dependencies packages are installed, then we will clone Netdata git repository from Github. The Netdata package software will be put on <home_directory>/netdata directory, on this tutorial will be put on /home/ramans/netdata directory. For this purpose, we will use git clone command line as shown below :

[ramans@otodiginet ~]$ git clone https://github.com/netdata/netdata.git --depth=100 --recursive
Cloning into 'netdata'...
remote: Enumerating objects: 2981, done.
remote: Counting objects: 100% (2981/2981), done.
remote: Compressing objects: 100% (2274/2274), done.
remote: Total 2981 (delta 1011), reused 1449 (delta 610), pack-reused 0
Receiving objects: 100% (2981/2981), 11.78 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (1011/1011), done.
Submodule 'aclk/aclk-schemas' (https://github.com/netdata/aclk-schemas.git) registered for path 'aclk/aclk-schemas'
Submodule 'mqtt_websockets' (https://github.com/underhood/mqtt_websockets.git) registered for path 'mqtt_websockets'
Cloning into '/home/ramans/netdata/aclk/aclk-schemas'...
remote: Enumerating objects: 161, done.        
remote: Counting objects: 100% (161/161), done.        
remote: Compressing objects: 100% (114/114), done.        
remote: Total 161 (delta 54), reused 53 (delta 5), pack-reused 0        
Receiving objects: 100% (161/161), 42.02 KiB | 93.00 KiB/s, done.
Resolving deltas: 100% (54/54), done.
Cloning into '/home/ramans/netdata/mqtt_websockets'...
remote: Enumerating objects: 298, done.        
remote: Counting objects: 100% (248/248), done.        
remote: Compressing objects: 100% (148/148), done.        
remote: Total 298 (delta 155), reused 186 (delta 98), pack-reused 50        
Receiving objects: 100% (298/298), 113.86 KiB | 138.00 KiB/s, done.
Resolving deltas: 100% (189/189), done.
Submodule path 'aclk/aclk-schemas': checked out 'a0adf5b1e026ee8339d56cfa27af95bb26b53177'
Submodule path 'mqtt_websockets': checked out '7849ed2a1980d821cc708fc88fd2ca3d27149d23'
Submodule 'MQTT-C' (https://github.com/underhood/MQTT-C.git) registered for path 'mqtt_websockets/MQTT-C'
Submodule 'c-rbuf' (https://github.com/underhood/c-rbuf.git) registered for path 'mqtt_websockets/c-rbuf'
Cloning into '/home/ramans/netdata/mqtt_websockets/MQTT-C'...
remote: Enumerating objects: 1948, done.        
remote: Total 1948 (delta 0), reused 0 (delta 0), pack-reused 1948        
Receiving objects: 100% (1948/1948), 1.00 MiB | 156.00 KiB/s, done.
Resolving deltas: 100% (1268/1268), done.
Cloning into '/home/ramans/netdata/mqtt_websockets/c-rbuf'...
remote: Enumerating objects: 60, done.        
remote: Counting objects: 100% (60/60), done.        
remote: Compressing objects: 100% (31/31), done.        
remote: Total 60 (delta 20), reused 50 (delta 15), pack-reused 0        
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 19 (delta 8), reused 13 (delta 8), pack-reused 6
Unpacking objects: 100% (19/19), 3.92 KiB | 401.00 KiB/s, done.
From https://github.com/underhood/MQTT-C
 * branch            fd169d07f51634f2294a51d5969ac107aac562ee -> FETCH_HEAD
Submodule path 'mqtt_websockets/MQTT-C': checked out 'fd169d07f51634f2294a51d5969ac107aac562ee'
Submodule path 'mqtt_websockets/c-rbuf': checked out '49981420edf53f7465e239c9fbf927921d357a5c'



2.2. Install Netdata

The next step is to Install Netdata package software. The installation script will be located on /home/ramans/netdata/netdata-installer.sh, then we will execute it by using root user.

[root@otodiginet ~]# cd /home/ramans/netdata/
[root@otodiginet netdata]# ls -ltr *.sh
-rwxrwxr-x. 1 ramans ramans   568 Sep 12 03:04 build-artifacts.sh
-rwxrwxr-x. 1 ramans ramans   892 Sep 12 03:04 cppcheck.sh
-rwxrwxr-x. 1 ramans ramans  6475 Sep 12 03:04 coverity-scan.sh
-rwxrwxr-x. 1 ramans ramans 70339 Sep 12 03:04 netdata-installer.sh
[root@otodiginet netdata]# ./netdata-installer.sh

  ^
  |.-.   .-.   .-.   .-.   .  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 /usr/sbin/netdata
   - config files   in /etc/netdata
   - web files      in /usr/share/netdata
   - plugins        in /usr/libexec/netdata
   - cache files    in /var/cache/netdata
   - db files       in /var/lib/netdata
   - log files      in /var/log/netdata
   - pid file       at /var/run/netdata.pid
   - logrotate file at /etc/logrotate.d/netdata
Installing Netdata on CentOS 8
Installing Netdata on CentOS 8

All the tasks that need to be done in the installation process have been carried out by the script, including starting and enabling the Netdata service. Following all installatin process until done as shown below.

Netdata Installation done
Netdata Installation done

3. Accessing Netdata

We can access Netdata monitoring tools from browser hit the URL of our sever’s IP address or hostname along with port number. Netdta using default port at 19999. At this tutorial we will hit the url : http://otodiginet:19999 as shown below.

Netdata front end Monitorig
Netdata front end Monitorig | http://otodiginet:19999

Until now, we have installed Netdata version 1.31.0 on CentOS 8 successfully. Generally, Netdata’s collectors can be grouped into three types:

  • Systems: Monitor CPU, memory, disk, networking, systemd, eBPF, and much more. Every metric exposed by /proc, /sys, and other Linux kernel sources.
  • Containers: Gather metrics from container agents, like dockerd or kubectl, along with the resource usage of containers and the applications they run.
  • Applications: Collect per-second metrics from web servers, databases, logs, message brokers, APM tools, email servers, and much more.

Conclusion

On this tutorial we have shown how to install Netdata monitorng tools on CentOS 8 operating system. I hope this article will be useful for anyone who is looking for a tutorial on how to install Netdata on the CentOS 8 operating system. Netdata installation references can be found on https://learn.netdata.cloud/docs/agent/packaging/installer/methods/manual.

Share this article via :

Leave a Reply

Your email address will not be published. Required fields are marked *