October 21, 2021
How to install Netdata on Ubuntu 20.04

How To Install Netdata On Ubuntu 20.04

On this article we will learn how to install Netdata (version v1.31.0, as the latest major release) on Ubuntu 20.04 LTS operating system. Netdata tagline is ‘Monitor everything in real time‘.

Introduction

As a system administrators, developers or operation teams, we need a tools that can be used to monitor our system in real time. This tools should help us in monitoring systems in realtime and quickly picking up faults or errors and resolving them to ensure things get back on track. Among the various monitoring systems that exist today, Netdata can be used as a good alternative. Netdata is free and open source tool designed to collect real-time metrics, such as CPU usage, disk activity, bandwidth usage, website visits and runs across various computing devices, physical servers, cloud servers, containers, and even IoT devices. On this article we will learn how to install Netdata on Ubuntu 20.04 LTS operating system.



Netdata Installation On Ubuntu 20.04 LTS

There are various ways to install Netdata, namely:

  • Installing Netdata using automated shell script
  • Installing Netdata using Ubuntu repository

Netdata Installation Using Automated Shell Script

This the simple way on installting Netdata on our Ubuntu system. The installation is done by executing shell script kickstart.sh script. We just type the command line : $ bash <(curl -Ss https://my-netdata.io/kickstart.sh).

Netdata Installation Using Ubuntu Repository

On this article we will deep dive, how to install Netdata using Ubuntu repository. There are several steps that must be taken if we choose this method, namely:

1. Update System

By updating our system, it will refresh the local list of available packages software to the newer stable version. To update Ubuntu 20.04 system repositories, we will use the command line: sudo apt update.

mpik@app01:~$ sudo apt update
[sudo] password for mpik: 
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                               
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease                                               
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease                                        
Get:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                              
Get:6 https://dlm.mariadb.com/repo/mariadb-server/10.6/repo/ubuntu focal InRelease [6,264 B]  

2. Install Netdata

To install Netdata on Ubuntu system, we will use the command line : sudo apt install netdata.

mpik@app01:~$ sudo apt install netdata
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-core-2.1-7 libevent-pthreads-2.1-7 libmecab2 libzip5 mecab-ipadic mecab-ipadic-utf8 mecab-utils
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  fonts-font-awesome fonts-glyphicons-halflings freeipmi-common libc-ares2 libfreeipmi17 libipmimonitoring6
  libjs-bootstrap libjudydebian1 libnetfilter-acct1 libnode64 netdata-core netdata-plugins-bash netdata-plugins-nodejs
  netdata-plugins-python netdata-web nodejs nodejs-doc
Suggested packages:
  freeipmi-tools apcupsd hddtemp lm-sensors nc fping python3-psycopg2 python3-pymysql npm
The following NEW packages will be installed:
  fonts-font-awesome fonts-glyphicons-halflings freeipmi-common libc-ares2 libfreeipmi17 libipmimonitoring6
  libjs-bootstrap libjudydebian1 libnetfilter-acct1 libnode64 netdata netdata-core netdata-plugins-bash
  netdata-plugins-nodejs netdata-plugins-python netdata-web nodejs nodejs-doc
0 upgraded, 18 newly installed, 0 to remove and 406 not upgraded.
Need to get 10.5 MB of archives.
After this operation, 47.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

3. Configuring Netdata

After Netdata installation was done, then we will configure Netadata monitoring system by editing /etc/netdata/netdata.conf file. On this file, we will update the bind socket to IP parameter to our own value. By default “bind socket to IP” is set to 17.0.0.1. This is fine for access netdata on local system. To enable access from remote system update this with our systems IP address.

[global]
        run as user = netdata
        web files owner = root
        web files group = root
        # Netdata is not designed to be exposed to potentially hostile
        # networks. See https://github.com/netdata/netdata/issues/164
#       bind socket to IP = 127.0.0.1
        bind socket to IP = 192.168.19.130

After updating Netdata configuration file was done, we have to restart Netdata service by submitting command line : systemctl restart netdata. Then we will monitor Netdata service by submitting command line : systemctl status netdata.

mpik@app01:~$ sudo systemctl restart netdata
mpik@app01:~$ sudo systemctl status netdata
● netdata.service - netdata - Real-time performance monitoring
     Loaded: loaded (/lib/systemd/system/netdata.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-09-11 07:08:06 PDT; 6s ago
       Docs: man:netdata
             file:///usr/share/doc/netdata/html/index.html
             https://github.com/netdata/netdata
   Main PID: 6688 (netdata)
      Tasks: 24 (limit: 9443)
     Memory: 40.9M
     CGroup: /system.slice/netdata.service
             ├─6688 /usr/sbin/netdata -D
             ├─6722 bash /usr/lib/netdata/plugins.d/tc-qos-helper.sh 1
             ├─6728 /usr/lib/netdata/plugins.d/apps.plugin 1
             ├─6733 /usr/lib/netdata/plugins.d/nfacct.plugin 1
             └─6766 /usr/bin/python3 /usr/lib/netdata/plugins.d/python.d.plugin 1

Sep 11 07:08:06 app01.otodiginet.com systemd[1]: Started netdata - Real-time performance monitoring.
Sep 11 07:08:06 app01.otodiginet.com netdata[6688]: SIGNAL: Not enabling reaper
Sep 11 07:08:06 app01.otodiginet.com netdata[6688]: 2021-09-11 07:08:06: netdata INFO  : MAIN : SIGNAL: Not enabling reaper

So far, we have successfully installed Netdata monitoring tools on a Ubuntu system.

4. Accessing Netdata Monitoring Tools

Netdata monitoring tools is binding on port 19999. We can access Netdata with Web browser by hitting the URL : http://ip_address:19999. On our example we use hostname as app01.otodiginet.com:19999.

Netdata dashboard on Ubuntu 20.04 LTS
Netdata dashboard on Ubuntu 20.04 LTS

Conclusion

We have successfully installed Netdata on Ubuntu 20.04 LTS operating system.

Share this article via :

Leave a Reply

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