How to Install and Use Netdata Performance Monitoring Tool on Debian 9
Netdata is a free, open source, scalable, distributed, real-time, performance and health monitoring tool for Linux based operating system. Netdata comes with simple, easy to use and extensible web dashboards that can be used to visualize the processes and services on your system. You can monitor CPU, RAM usage, disk I/O, network traffic, and Postfix using Netdata. Netdata runs on all systems like, physical machines, virtual machines, containers and IoT devices without disrupting their core function.
Netdata comes with lot's of features, some of them are listed below:
- Stunning interactive bootstrap dashboards.
- Supports dynamic thresholds, alarm templates, hysteresis and multiple role-based notification methods.
- You can built custom dashboards easily using HTML.
- Collects thousands of metrics per server per second, with just 1% CPU utilization of a single core.
- It monitors almost everything such as, CPU, Memory, Disks, Iptables, Processes, Network interfaces, NFS servers, Apache servers, Redis databases, Postgres databases, MySQL databases, Tomcat, Postfix and Exim mail servers, SNMP devices, Squid proxy servers, and many more.
In this tutorial, we will learn how to install Netdata Performance Monitoring tool on Debian 9.
- Debian 9 Desktop/Server installed on your system.
- Non-root user with sudo privileges.
Before starting, you will need to install some packages required to install Netdata.
First, update the package repository by running the following command:
sudo apt-get update -y
sudo apt-get upgrade -y
Next, install all the required dependencies using the following command:
sudo apt-get install zlib1g-dev uuid-dev libmnl-dev pkg-config curl gcc make autoconf autoconf-archive autogen automake python python-yaml python-mysqldb nodejs lm-sensors python-psycopg2 netcat git -y
Once all the packages are installed, you can proceed to the next step.
First, download the latest version of the Netdata from Git repository. You can do this by running the following command:
git clone https://github.com/firehol/netdata.git --depth=1 ~/netdata
Next, change the directory to the cloned directory using the following command:
Next, install the Netdata by running the netdata-installer.sh script as shown below:
You should see the following output:
^ |.-. .-. .-. .-. . 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 >
Now, press Enter to continue with the installation. Once the installation is completed successfully, you should see the following output:
--- We are done! --- ^ |.-. .-. .-. .-. .-. . netdata .-. .- | '-' '-' '-' '-' '-' is installed and running now! -' '-' +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> enjoy real-time performance and health monitoring...
You can start, stop and get the status of the Netdata service by running the following command:
sudo systemctl start netdata
sudo systemctl stop netdata
sudo systemctl status netdata
You should see the following output if Netdata run's properly:
? netdata.service - Real time performance monitoring Loaded: loaded (/etc/systemd/system/netdata.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2018-02-10 11:19:29 EST; 18min ago Process: 575 ExecStartPre=/bin/chown -R netdata:netdata /var/cache/netdata (code=exited, status=0/SUCCESS) Process: 574 ExecStartPre=/bin/mkdir -p /var/cache/netdata (code=exited, status=0/SUCCESS) Main PID: 580 (netdata) Tasks: 17 (limit: 4915) CGroup: /system.slice/netdata.service ??580 /usr/sbin/netdata -P /run/netdata/netdata.pid -D ??600 bash /usr/libexec/netdata/plugins.d/tc-qos-helper.sh 1 ??612 /usr/libexec/netdata/plugins.d/apps.plugin 1 ??613 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.plugin 1 Feb 10 11:19:27 Netdataserver systemd: Starting Real time performance monitoring... Feb 10 11:19:29 Netdataserver systemd: Started Real time performance monitoring.
Netdata runs on port 19999, so you will need to allow port 19999 through the UFW firewall. By default, UFW is not installed in Debian 9. You can install it by running the following command:
sudo apt-get install ufw -y
Once UFW is installed, enable it with the following command:
sudo ufw enable
Next, allow port 19999 using the UFW firewall as follows:
sudo ufw allow 19999/tcp
Next, reload the firewall to apply all the changes:
sudo ufw reload
Once the UFW firewall is configured, you can proceed to access Netdata web interface.
Access Netdata Web Interface
Open your web browser and type the URL http://your-server-ip:19999, you will be redirected to the Netdata dashboard as shown in the below image:
Load and Disk I/O:
You can also view Netdata's current configuration in your browser by typing the URL http://your-server-ip:19999/netdata.conf. You should see the following page:
In the above image, you should see all of the configurable options are commented out. You can configure it as per your need by editing /etc/netdata/netdata.conf file.
Update and Uninstall Netdata
If you want to remove Netdata from your system, then you can run the following command:
sudo /netdata-uninstaller.sh --force
If you want to update the Netdata to the latest version by running the following command:
Congratulations! you have successfully installed Netdata on Debian 9.