Netdata is an open-source software designed for real-time monitoring of your server. With this software, you can view and collect data about the performance of your server and its various components in real-time. You can monitor CPU load, memory, disks, network traffic, and much more. The installation and configuration of Netdata on Ubuntu server are straightforward and take only a few minutes. The monitoring is accessible through a web browser by entering the server’s IP address and port 19999.
Installation and Configuration of Netdata on Ubuntu Server
To set up monitoring on your server, first log in via SSH and enter the following two commands.
sudo apt update sudo apt install netdata
The command ‘sudo apt update’ is used to update the list of available packages in your system from APT (Advanced Package Tool) repositories. The second command will perform the actual installation of the tool. During the installation, you will need to confirm it (by pressing the letter ‘y’ for yes and then pressing Enter to confirm the choice).
Now, choose your favorite text editor to modify the Netdata configuration file. This file is located at /etc/netdata/netdata.conf. In the example, we will use the nano editor. You can use your preferred editor, such as vim.
sudo nano /etc/netdata/netdata.conf
Once the editor starts, you will be interested in this section of the configuration file:
run as user = netdata web files owner = root web files group = root bind socket to IP = 127.O.O.O
In this section, modify the ‘bind socket’ line and replace the localhost address with the IP address of your server. Save the edited configuration file. In the nano editor, you can save the file by pressing the CTRL+X key combination. Then confirm the file modification by pressing ‘y’ and pressing the Enter key.
If you have the UFW firewall enabled on your server, you will also need to add a rule to allow access to port 19999. You can set up two types of rules in the firewall. The first rule allows access to the monitoring from anywhere, while the second rule allows monitoring only from a specific IP address. I highly recommend using the second rule, keeping the monitoring hidden behind the firewall and accessible only from your defined IP address (e.g., home or work). You can find your current IP address on the website myip.com.
Rule to allow monitoring from anywhere.
sudo ufw allow 19999
Rule to keep monitoring hidden behind the firewall and accessible only from a pre-defined IP address. Change the IP address 220.127.116.11 to your own.
sudo ufw allow from 18.104.22.168 to any port 19999
Installation and configuration of Netdata on Ubuntu server – Conclusion
And that’s it. Now your monitoring is accessible at http://22.214.171.124:19999. Of course, you should modify the IP address in the URL to match your server’s IP address. Finally, I’m attaching a few screenshots from the interface so you can get an idea of what the monitoring looks like.
Je mi líto, že pro Vás nebyl článek užitečný.
Jak mohu vylepšit článek?
Řekněte mi, jak jej mohu zlepšit.