Setup Netdata For Real Time Performance Monitor In Linux System

Netdata is nothing but a nice daemon used to real-time performance monitor of Linux systems. Performance Monitor in the sense Hardware Monitoring (like Disk Usage, Memory Usage, RAID usage, LVM usage, SWAP Memory Usage, Kernel performance and so on.), Network Monitoring (Eg: Bandwidth Usage, Network link up and down status, PING status, and so on.), System process like a number of started and stopped services and daemons and its utilization, SNMP devices and so on. We have so many tools to check all these things (eg : fdisk, ps, top, free, ping, netstat…etc.) in Linux but netdata provides us all the required and mandatory features in a single place.

Setup Netdata For Real Time Performance Monitor In Linux System

Setup Netdata For Real-Time Performance Monitor In Linux System

You can install this tool on almost all Linux distros but here we are going to see how to install netdata on CentOS/Redhat Linux System. Configuration steps of netdata are so easy and don’t take much time.

So let’s have look at the steps below to install and configure netdata real-time performance monitor tool in Linux.

Follow the below steps to Install Netdata – Real-Time Performance Monitor Tool in Linux:

Setup Netdata For Real Time Performance Monitor In Linux System

Netdata For Real-Time Performance Monitor

Step: 1 Install Required Packages

First, we need to install the required packages and it’s dependencies of Netdata.

Required Packages are :

autoconf, git, curl, automake, GCC, libmnl-devel, libuuid-devel, lm_sensors, make, MySQL-python, nc, pkgconfig, zlib-devel, python, python-psycopg2, PyYAML, psmisc

Refer to the sample output for install required packages.

# Install Required Packages

[root@localhost ~]# yum -y install autoconf git curl automake gcc libmnl-devel libuuid-devel lm_sensors make MySQL-python nc pkgconfig zlib-devel python python-psycopg2 PyYAML psmisc
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * epel: ftp.riken.jp
 * extras: mirror.tadu.vn
 * updates: centos.mirror.net.in
Package curl-7.19.7-52.el6.x86_64 already installed and latest version
Package gcc-4.4.7-17.el6.x86_64 already installed and latest version
Package 1:make-3.81-23.el6.x86_64 already installed and latest version
Package 1:pkgconfig-0.23-9.1.el6.x86_64 already installed and latest version
Package psmisc-22.6-19.el6_5.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be installed
---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64
---> Package autoconf.noarch 0:2.63-5.1.el6 will be installed
.
.
.
.
  Verifying  : python-libs-2.6.6-64.el6.x86_64                                                                                                                    24/26 
  Verifying  : python-2.6.6-64.el6.x86_64                                                                                                                         25/26 
  Verifying  : libblkid-2.17.2-12.24.el6.x86_64                                                                                                                   26/26 

Installed:
  MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6   PyYAML.x86_64 0:3.10-3.1.el6            autoconf.noarch 0:2.63-5.1.el6                automake.noarch 0:1.11.1-4.el6    
  git.x86_64 0:1.7.1-4.el6_7.1               libmnl-devel.x86_64 0:1.0.2-3.el6       libuuid-devel.x86_64 0:2.17.2-12.24.el6_8.1   lm_sensors.x86_64 0:3.1.1-17.el6  
  nc.x86_64 0:1.84-24.el6                    python-psycopg2.x86_64 0:2.0.14-2.el6   zlib-devel.x86_64 0:1.2.3-29.el6             

Dependency Installed:
  libmnl.x86_64 0:1.0.2-3.el6 libyaml.x86_64 0:0.1.3-4.el6_6 perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-4.el6_7.1 postgresql-libs.x86_64 0:8.4.20-6.el6

Updated:
  python.x86_64 0:2.6.6-66.el6_8                                                                                                                                        

Dependency Updated:
  libblkid.x86_64 0:2.17.2-12.24.el6_8.1   libuuid.x86_64 0:2.17.2-12.24.el6_8.1   python-libs.x86_64 0:2.6.6-66.el6_8   util-linux-ng.x86_64 0:2.17.2-12.24.el6_8.1  

Complete!

Step: 2 Clone the Netdata from git

All required packages and their dependencies are installed successfully. In our next step we have to clone the netdata from git, so follow the below output to do the same.

[root@localhost ~]# git clone https://github.com/firehol/netdata.git --depth=1  # Clone the Netdata from git
Initialized empty Git repository in /root/netdata/.git/
remote: Counting objects: 1704, done.
remote: Compressing objects: 100% (1313/1313), done.
remote: Total 1704 (delta 1016), reused 755 (delta 369), pack-reused 0
Receiving objects: 100% (1704/1704), 3.82 MiB | 12 KiB/s, done.
Resolving deltas: 100% (1016/1016), done.

Step : 3 Install the Package

Once cloning completed then you will found a directory called netdata on your current directory, So change the directory to netdata. Follow the sample output below.

[root@localhost ~]# ls
anaconda-ks.cfg  Desktop  Documents  Downloads  install.log  install.log.syslog  Music  netdata  Pictures  Public  Templates  Videos
[root@localhost ~]# cd netdata

Now install the Netdata by running the script file i.e. netdata-installer.sh

During installation it will ask to press ENTER to continue the installation process, So press ENTER there.

[root@localhost netdata]# ./netdata-installer.sh   # Start Netdata Installation 

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


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

  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.

Press ENTER to build and install netdata to your system > 

Once netdata installation process completed then you will able to see a screen something like this as shown in the output below. The default port used by netdata real-time performance monitor tool is 19999.

Step: 4 Access Netdata Web Access

So now you can access the Netdata Real-Time Performance Monitor tool by URL http://localhost:19999 OR http://Your_IP Address:19999.

So many other details we can able to found on the below output i.e.

  • /usr/sbin/netdata   –  To start the Netdata Service
  • killall netdata  –  To stop the Netdata Service

To Uninstall Netdata go to Netdata directory that we have previously cloned from git on Step 2 then run the below command.

./netdata-uninstaller.sh   # To Uninstall Netdata

To Uninstall Netdata go to Netdata directory

./netdata-updater.sh   # To Update Netdata

Follow the sample output below.

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

  http://this.machine.ip:19999/   # Access Netdata Web Access

To stop netdata, just kill it, with:

  killall netdata   # Stop Netdata

To start it, just run it:

  /usr/sbin/netdata   # Start Netdata Service


Uninstall script generated: ./netdata-uninstaller.sh
Update script generated   : ./netdata-updater.sh

netdata-updater.sh can work from cron. It will trigger an email from cron
only if it fails (it does not print anything if it can update netdata).
Run this to automatically check and install netdata updates once per day:

ln -s /root/netdata/netdata-updater.sh /etc/cron.daily/netdata-updater.sh

 --- We are done! --- 

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

  enjoy real-time performance and health monitoring...

Snapshot :

Setup Netdata For Real Time Performance Monitor In Linux System

Netdata For Real-Time Performance Monitor-Web-Access

For more advanced configuration you can edit and configure the main configuration file of netdata. Refer to the command below.

[root@localhost netdata]# nano /etc/netdata/netdata.conf   # Edit main configuration file of Netdata

Also Read – How to install Stacer System Optimizer in Ubuntu

You can Stop the Linux Firewall i.e. iptables or can bypass the netdata port

[root@localhost ~]# /etc/init.d/iptables stop   # Stop IPTables Service
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

That’s all, In this article, we have explained Setup Netdata For Real-Time Performance Monitor In Linux System. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:

Mangesh Dhulap

This is Mangesh Dhulap the Founder and Editor of IT SMART TRICKS have 6+ years of Industrial Experience. We expect from our visitors to like, share, and comment on our posts.

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.