There is a new version of this tutorial available for Ubuntu 22.04 (Jammy Jellyfish).

How to Install Netdata Monitoring Tool on Ubuntu 20.04

Netdata is a free, open-source and real-time performance and health monitoring tool. It supports Linux, MacOS and FreeBSD. You can troubleshoot and monitor cloud-based servers, containers and your entire IT infrastructure with Netdata. It provides real-time system metrics including, Memory usage, CPU, Bandwidth, Disk utilization and more. You can also integrate it with other monitoring tools like Prometheus, Graphite, OpenTSDB, Kafka, Grafana, and more.

In this tutorial, we will show you how to install the Netdata monitoring tool on Ubuntu 20.04 server.

Prerequisites

  • A server running Ubuntu 20.04.
  • A root password is configured the server.

Install Netdata with Automated Script

The simple and easiest way to install the Netdata from the automatic installation script.

First, install the curl utility with the following command:

apt-get install curl -y

Once installed, you can download and run Netdata auto-installation script with the following command:

bash <(curl -Ss https://my-netdata.io/kickstart.sh)

You will be asked to install required dependencies in your system as shown below:

NOTE: Running apt-get update and updating your APT caches ...
apt-get update 
apt-get install autoconf autoconf-archive autogen automake cmake gcc git libelf-dev libjson-c-dev libjudy-dev liblz4-dev libmnl-dev libssl-dev libtool libuv1-dev make pkg-config uuid-dev zlib1g-dev 


Press ENTER to run it > 

Press Enter to install all the dependencies in your system. You will be asked to build the Netdata as shown below:

 --- Installing netdata... --- 
[/tmp/netdata-kickstart-LnvxPHJfuV/netdata-v1.26.0-292-gfbb5d8e2]# ./netdata-installer.sh --auto-update 
  ^
  |.-.   .-.   .-.   .-.   .  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

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


  NOTE:
  Anonymous usage stats will be collected and sent to Google Analytics.
  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).

Press ENTER to build and install netdata to your system > 

Press Enter to install the Netdata. Once the installation has been finished, you should get the following output:

Setting netdata.tarball.checksum to 'new_installation'

 --- We are done! --- 

  ^
  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'  
  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->

  enjoy real-time performance and health monitoring...

 OK  

Install Netdata From Ubuntu Repository

By default, Netdata is available in the Ubuntu 20.04 standard repository. You can install it by just running the following command:

apt-get install netdata -y

Once the Netdata is installed, edit the Netdata default configuration file and change the bind-address with your server-ip:

nano /etc/netdata/netdata.conf

Change the following lines:

[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 = your-server-ip

Save and close the file when you are finished. Then, restart the Netdata service to apply the changes:

systemctl restart netdata

You can verify the status of the Netdata with the following command:

systemctl status netdata

You should get the following output:

? netdata.service - netdata - Real-time performance monitoring
     Loaded: loaded (/lib/systemd/system/netdata.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-12-02 04:55:57 UTC; 9s ago
       Docs: man:netdata
             file:///usr/share/doc/netdata/html/index.html
             https://github.com/netdata/netdata
   Main PID: 18021 (netdata)
      Tasks: 22 (limit: 4691)
     Memory: 35.4M
     CGroup: /system.slice/netdata.service
             ??18021 /usr/sbin/netdata -D
             ??18100 /usr/bin/python3 /usr/lib/netdata/plugins.d/python.d.plugin 1
             ??18106 bash /usr/lib/netdata/plugins.d/tc-qos-helper.sh 1
             ??18108 /usr/lib/netdata/plugins.d/nfacct.plugin 1
             ??18109 /usr/lib/netdata/plugins.d/apps.plugin 1

Dec 02 04:55:57 ubuntu2004 systemd[1]: Started netdata - Real-time performance monitoring.
Dec 02 04:55:57 ubuntu2004 netdata[18021]: SIGNAL: Not enabling reaper
Dec 02 04:55:57 ubuntu2004 netdata[18021]: 2020-12-02 04:55:57: netdata INFO  : MAIN : SIGNAL: Not enabling reaper

At this point, Netdata is installed and listening on port 19999.

ss -antpl | grep 19999

You should get the following output:

LISTEN    0         4096         216.98.11.171:19999            0.0.0.0:*        users:(("netdata",pid=18021,fd=4))    

Once you are finished, you can proceed to the next step.

Access Netdata Web Interface

Now, open your web browser and access the Netdata web interface using the URL http://your-server-ip:19999. You should see the Netdata web interface in the following screen:

Netdata System Monitor

CPU and Load

CPU Load monitoring

Disk and RAM Usage

Disk Monitoring

Swap and Network

Network Monitoring

Conclusion

Congratulations! you have successfully installed Netdata on Ubuntu 20.04 server. You can now install Netdata agent on the client machine and start monitoring system resources from the Netdata web dashboard. Feel free to ask me if you have any questions.

Share this page:

3 Comment(s)