How to Install Netdata on CentOS 7

Netdata is an Open Source real time server monitoring tool. It collects real time data like CPU usage, RAM usage, Load, SWAP usage, Bandwidth usage, Disk usage etc.

Update the server using the following command.

yum update

Install the EPEL repository.

yum install epel-release

Install the required packages.

yum install gcc make git curl zlib-devel git automake libuuid-devel libmnl autoconf pkgconfig findutils

Clone the Netdata Packages from GitHub source.

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

Output:

[root@vps ~]#  git clone https://github.com/netdata/netdata.git --depth=100
Cloning into 'netdata'...
remote: Enumerating objects: 2302, done.
remote: Counting objects: 100% (2302/2302), done.
remote: Compressing objects: 100% (1843/1843), done.
remote: Total 2302 (delta 590), reused 1027 (delta 391), pack-reused 0
Receiving objects: 100% (2302/2302), 6.32 MiB | 8.03 MiB/s, done.
Resolving deltas: 100% (590/590), done.

Change directory to the Netdata directory.

cd netdata/

Install-required-packages.sh script by running the following script.

./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata 

Install netdata by running the following netdata official script.

./netdata-installer.sh

To start the netdata service.

systemctl start netdata

To restart the netdata service.

systemctl enable netdata

To check the status of netdata service.

systemctl status netdata

Output:

[root@vps netdata]# systemctl status netdata
● netdata.service - Real time performance monitoring
   Loaded: loaded (/usr/lib/systemd/system/netdata.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2021-02-03 15:57:39 EST; 37s ago
 Main PID: 20957 (netdata)
   CGroup: /system.slice/netdata.service
           ├─20957 /usr/sbin/netdata -P /var/run/netdata/netdata.pid -D
           ├─20971 /usr/sbin/netdata --special-spawn-server
           ├─21098 bash /usr/libexec/netdata/plugins.d/tc-qos-helper.sh 1
           ├─21122 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.pl...
           ├─21123 /usr/libexec/netdata/plugins.d/go.d.plugin 1
           └─21126 /usr/libexec/netdata/plugins.d/apps.plugin 1

Netdata by default listens on port 19999. Run the following command to confirm this.

yum install net-tools

netstat -pnltu | grep netdata

Output:

[root@vps netdata]# netstat -pnltu | grep netdata
tcp        0      0 127.0.0.1:8125          0.0.0.0:*               LISTEN      20957/netdata
tcp        0      0 0.0.0.0:19999           0.0.0.0:*               LISTEN      20957/netdata
tcp6       0      0 ::1:8125                :::*                    LISTEN      20957/netdata
tcp6       0      0 :::19999                :::*                    LISTEN      20957/netdata
udp        0      0 127.0.0.1:8125          0.0.0.0:*                           20957/netdata

Configure the Firewall.

Allow port 19999/tcp in Firewall to Access Netdata from browser.

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

firewall-cmd --reload

Netdata Dashboard

Enter the following URL on the browser to access the Netdata dashboard. By default netdata works on 19999 port.

http://<Enter Your IP Here>:19999/

The dashboard will look like this.

image