NetData : A Real-time performance monitoring tool for Linux

About NetData

NetData is a free, simple, yet useful utility that provides the real-time performance monitoring for your Linux systems, applications, SNMP devices, and visualize the result in a web browser with comprehensive detail. So, you can clearly get an idea of what is happening now, and what happened before in your Linux systems and applications. You don’t need to be an expert to deploy this tool in your Linux systems. NetData just works fine out of the box with zero configuration, and zero dependencies. Just install this utility and sit back, NetData will take care of the rest.

It has its own built-in webserver to display the result in graphical format. NetData is incredibly fast and efficient, and it will immediately start to analyze the performance of your system in no time after installing it. It is written using C programming language, so it is extremely light weight. It consumes less than 3% of a single core CPU usage and a 10-15MB of RAM. We can easily embed the charts with any existing web pages, and also it has a plugin API, so that you can monitor any application.

Here is the list of things that will be monitored by NetData utility in your Linux system.

  • CPU usage
  • RAM Usage
  • Swap memory usage
  • Kernel memory usage
  • Hard disks and its usage
  • Network interfaces
  • IPtables
  • Netfilter
  • DDoS protection
  • Processes
  • Applications
  • NFS server
  • Web server (Apache & Nginx)
  • Database servers (MySQL)
  • DHCP server
  • DNS server
  • Email server
  • Proxy server
  • Tomcat
  • PHP
  • SNP devices
  • And many more.

NetData will work on almost all Linux operating systems such as,

  • Arch Linux
  • Alpine Linux
  • CentOS
  • Fedora
  • Gentoo
  • PLD Linux
  • RedHat Enterprise Linux
  • SUSE
  • Ubuntu / Debian

Install NetData On Arch Linux

The latest version is available in the Arch Linux default repositories. So, we can install it with pacman using command:

sudo pacman -S netdata
Deepin Terminal_001

Install NetData in Arch Linux

At the end of installation, you will see the following message.

After the daemon has been started for the first time,
download the default config file from
http://127.0.0.1:19999/netdata.conf

Copy it to /etc/netdata/ and modify it.

Optional dependencies for netdata
 nodejs: Webbox plugin
NetData installation completed

NetData installation completed

Finally, start NetData service using command:

sudo /usr/sbin/netdata

Install NetData on DEB or RPM based systems

NetData is not available in DEB based (Ubuntu / Debian) or RPM based (RHEL / CentOS / Fedora) systems. We need to install NetData using its repository.

First install the required dependencies:

On Ubuntu / Debian distros:

sudo apt-get install curl jq nodejs zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autogen automake pkg-config

On RHEL / CentOS / Fedora distros:

sudo yum install curl jq nodejs zlib-devel libuuid-devel libmnl-devel gcc make git autoconf autogen automake pkgconfig

After installing the required dependencies, install NetData on DEB or RPM based systems as shown below.

Git clone the NetData repository:

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

The above command will create a directory called ‘netdata’:

Cloning into 'netdata'...
remote: Counting objects: 279, done.
remote: Compressing objects: 100% (261/261), done.
remote: Total 279 (delta 11), reused 118 (delta 1), pack-reused 0
Receiving objects: 100% (279/279), 1.64 MiB | 246.00 KiB/s, done.
Resolving deltas: 100% (11/11), done.
Checking connectivity... done.

Change to the ‘netdata’ directory:

cd netdata/

Finally, install and start NetData using command:

sudo ./netdata-installer.sh

Sample output:

Welcome to netdata!
Nice to see you are giving it a try!

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 at /etc/netdata
 - web files at /usr/share/netdata
 - plugins at /usr/libexec/netdata
 - cache files at /var/cache/netdata
 - db files at /var/lib/netdata
 - log files at /var/log/netdata
 - pid file at /var/run

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 > ## Press ENTER key

After installing NetData, you will see the following output at the end:

-------------------------------------------------------------------------------

OK. NetData is installed and it is running (listening to *:19999).

-------------------------------------------------------------------------------

INFO: Command line options changed. -pidfile, -nd and -ch are deprecated.
If you use custom startup scripts, please run netdata -h to see the 
corresponding options and update your scripts.

Hit http://localhost:19999/ from your browser.

To stop netdata, just kill it, with:

killall netdata

To start it, just run it:

/usr/sbin/netdata


Enjoy!

Uninstall script generated: ./netdata-uninstaller.sh
Install NetData

Install NetData

NetData has been installed and started.

Allow NetData default port via Firewall or Router

If you system behind any firewall, and want to to access the NetData web interface from any remote systems on the network, you must allow the 19999 port through your firewall/router.

On Ubuntu / Debian:

sudo ufw allow 19999

On CentOS / RHEL / Fedora:

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

Access NetData via Web browser

Open your web browser, and navigate to http://localhost:19999/. You should see a screen something like below.

NetData dashboard

NetData dashboard

Here, You will find the complete statistics of your Linux system in this page. Scroll down to view each section.

You can download and view NetData default configuration file at any time by simply navigating to http://localhost:19999/netdata.conf.

NetData configuration file

NetData configuration file

Starting / Stopping NetData

To start NetData, run:

sudo /usr/sbin/netdata

To stop netdata, just kill it, using command:

sudo killall netdata

Updating NetData

In Arch Linux, just run the following command to update NetData. If the updated version is available in the repository, it will be automatically installed.

sudo pacman -Syyu

In DEB or RPM based systems, just go to the directory where you have cloned it (In our case it’s netdata).

cd netdata

Pull the latest update using command:

git pull

Then, rebuild and update it using command:

sudo ./netdata-installer.sh

Uninstalling NetData

Go to the location where you have cloned NetData.

cd netdata

Then, uninstall it using command:

sudo ./netdata-uninstaller.sh --force

In Arch Linux, the following command will uninstall it.

sudo pacman -R netdata

That’s all for now. NetData is pretty simple in terms of installation and usage. You can monitor the performance of your local system or remote system in minutes without much hassle. As far as I tested NetData, it worked well as I expected. Give it a try, you won’t be disappointed.

Cheers!

Reference links:

  • ronnie droid

    Awesome tool. Though some info on how to secure the utility would really be great. Risky running this on a public network