Netdata: How to Know the Performance of Your Linux Server in Real Time

If you have a server or computer with the Linux operating system, this tool will interest you. It is increasingly necessary to have tools that help us have visibility of what is happening with performance, especially if it is a server and has multiple services running.

Today in this article we are going to talk in detail about Netdata, a Linux tool that will allow us to have control over everything that happens with our Linux computer or server, or, depending on the case, if you have a Linux infrastructure, this will be even more Useful. It is completely free and does not require too much knowledge for its installation and commissioning.

There are situations when we need to accurately measure how our Linux computers are performing, be it a home computer, or a high-performance server. Above all, in business environments, not knowing what is happening on the server, can greatly affect operations, consequently the business is affected. Another aspect to highlight is that the tool is characterized by being quite visual, it uses many types of graphics to understand numbers more easily, this helps us to see everything at a glance, and even when making reports and / or document the status of the servers.

Know the Performance of Your Linux Server in Real Time

What can I do with Netdata?

As we have mentioned, thanks to Netdata we can count on multiple metrics and ways of visualizing the performance of our Linux servers. It is very easy to configure and does not take much time, the monitoring capacity of the tool is given in real time, so everything you can see will be accurate information. Other important features are that it is free and open source, these points make it especially friendly for those people who do not have much experience with this type of tool. A bad belief is that open source tools, or those that are Linux oriented, should be handled only by people very experienced with the Linux command line. The documentation that is accessible on the official portal is very complete, so it is difficult to get stuck with a problem that we do not know how to solve.

Above is a schematic demonstrating how this solution works. It begins with the collection of the data, they are stored in a concurrent database, so the processing of them is much faster. This, in relation to traditional database engines. The monitoring of the state of Linux devices occurs through review operations that are performed every second and make a comprehensive examination of the device. Given the minimum record of irregularity in performance, it is possible to report it through alarms.

Integrations with multiple platforms and applications

In order to make this tool even more useful, it is possible to integrate it with multiple platforms and applications, we can even incorporate messaging services such as Slack and Telegram . You can also integrate various network and VPN solutions, such as fping, OpenVPN , SynProxy, ISC DHCPD, LibreSwn and many more. Some popular security solutions that are included are Fail2Ban, FreeRadius and OpenLDAP. The possibilities are endless, so there are almost no excuses to start using it.

How to install Netdata on any Linux server

With a single command it is possible to install Netdata in any Linux distribution you have. Already with this same command you can install the tool and its required packages, in addition to activating the compilation process.

The following command has the following characteristics:

  • Compatible with any Linux distribution
  • Automatic updates activated
  • Version: Nightly
  • Obtaining anonymous statistics

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

The following command has the following characteristics:

  • Compatible with any Linux distribution
  • Automatic updates disabled
  • Version: Nightly
  • Obtaining anonymous statistics

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

The following command has the following characteristics:

  • Compatible with any Linux distribution
  • Automatic updates disabled
  • Version: Stable
  • Obtaining anonymous statistics

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

Netdata’s own website has a wizard that adapts the command according to the four characteristics mentioned. You simply must adjust each of them according to the needs you have.

Next, we are going to demonstrate how to install this solution in Ubuntu which will help us have an idea of what to expect when we execute each step of the Netdata installation. As we have commented, consider the installation options and accordingly modify them, copy and paste the command.

You must ensure that the bash is active

bash

Install Netdata directly from the official repository on Github

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

This is what should appear in the console once the installation has been successfully completed:

netdata by default listens on all IPs on port 19999,
so you can access it with:
http://this.machine.ip:19999/
To stop netdata run:
systemctl stop netdata
To start netdata run:
systemctl start netdata
Uninstall script copied to: /usr/libexec/netdata/netdata-uninstaller.sh
--- Install netdata updater tool ---
Update script is located at /usr/libexec/netdata/netdata-updater.sh
--- Check if we must enable/disable the netdata updater ---
You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling)
Did not find any cron entries to remove
--- Wrap up environment set up ---
Preparing .environment file
Setting netdata.tarball.checksum to 'new_installation'
--- We are done! ---
^
|.-. .-. .-. .-. .-. . netdata .-. .-
| '-' '-' '-' '-' '-' is installed and running now! -' '-'
+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
enjoy real-time performance and health monitoring...
http://this.machine.ip:19999/
To stop netdata run:
systemctl stop netdata
To start netdata run:
systemctl start netdata
Uninstall script copied to: /usr/libexec/netdata/netdata-uninstaller.sh
--- Install netdata updater tool ---
Update script is located at /usr/libexec/netdata/netdata-updater.sh
--- Check if we must enable/disable the netdata updater ---
You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling)
Did not find any cron entries to remove
--- Wrap up environment set up ---
Preparing .environment file
Setting netdata.tarball.checksum to 'new_installation'
--- We are done! ---
^
|.-. .-. .-. .-. .-. . netdata .-. .-
| '-' '-' '-' '-' '-' is installed and running now! -' '-'
+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
enjoy real-time performance and health monitoring...

All this we have done must be consolidated using these three commands. With them we will execute, enable and verify the status of our installation.

$ sudo systemctl start netdata

$ sudo systemctl enable netdata

$ sudo systemctl status netdata

Wait for this text when finished

netdata.service - Real time performance monitoring
Loaded: loaded (/lib/systemd/system/netdata.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-08-17 06:42:04 UTC; 3min 8s ago
Main PID: 2796 (netdata)
Tasks: 26 (limit: 1152)
CGroup: /system.slice/netdata.service
├─2796 /usr/sbin/netdata -P /var/run/netdata/netdata.pid -D -W set global process scheduling policy keep -W set global OOM score keep
├─2887 /usr/libexec/netdata/plugins.d/go.d.plugin 1
├─2889 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.plugin 1
├─2890 /usr/libexec/netdata/plugins.d/apps.plugin 1
└─2891 bash /usr/libexec/netdata/plugins.d/tc-qos-helper.sh 1

Enter the Netdata web interface

Note: To ensure that we can correctly access the Netdata web interface, we must enable a rule in the firewall to allow traffic through port 19999.

$ sudo ufw allow 19999/tcp

The following command will indicate if the port is effectively enabled.

$ sudo ufw status

Finally, let’s enter our browser to enter the web interface of the program. You have two options:

  • http: // localhost: 19999
  • http: // IP-Address-of-your-Ubuntu-environment: 19999

We will have a view like this, which is what will allow us from now on to have control of our servers and other devices with Linux distributions:

We recommend you access the official portal of the tool and consult the documentation. And you, do you know alternatives to Netdata? Do not hesitate to tell us in the comments.