Netdata is a free, open source, scalable, distributed, real-time, performance and health monitoring tool for Linux-based operating systems. Netdata comes with a simple, easy-to-use, and scalable web dashboard that can be used to visualize processes and services on your system. You can use Netdata to monitor CPU, RAM usage, disk I/O, network traffic and Postfix. Netdata runs on all systems such as physical machines, virtual machines, containers and IoT devices without interrupting its core functionality.
Netdata comes with a lot of features, some of them are listed below:
In this tutorial, we will learn how to install Netdata Performance Monitoring tool on Debian 9.
Debian 9 desktop/server installed on your system.
A non-root user with sudo privileges.
Before you begin, you 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 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 packages are installed, you can proceed to the next step.
First, download the latest version of Netdata from the Git repository. You can do this by running the following command:
git clone https://github.com/firehol/netdata.git --depth=1 ~/netdata
Next, change directory to the cloned directory using the following command:
cd netdata
Next, install Netdata by running the netdata-installer.sh script as follows:
sudo ./netdata-installer.sh
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 the installation. Once the installation completes 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 commands:
sudo systemctl start netdata sudo systemctl stop netdata sudo systemctl status netdata
If Netdata is running normally, you should see the following output:
? 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[1]: Starting Real time performance monitoring... Feb 10 11:19:29 Netdataserver systemd[1]: Started Real time performance monitoring.
Netdata runs on port 19999, so you 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 using the following command:
sudo ufw enable
Next, allow the use of UFW firewall port 19999 as follows:
sudo ufw allow 19999/tcp
Next, reload the firewall to apply all changes:
sudo ufw reload
Once the UFW firewall is configured, you can continue to access the Netdata web interface.
打开您的网络浏览器并输入URL http:// your-server-ip:19999 ,您将被重定向到Netdata仪表板,如下图所示:
CPU使用率:
负载和磁盘I / O:
内存使用情况:
IPv4网络:
磁盘使用情况:
您也可以通过输入URL http:// your-server-ip:19999 / netdata.conf在浏览器中查看Netdata的当前配置。 您应该看到以下页面:
在上图中,您应该看到所有可配置选项都被注释掉了。 您可以通过编辑/etc/netdata/netdata.conf文件来根据需要对其进行配置。
如果您想从系统中删除Netdata,则可以运行以下命令:
cd netdata sudo /netdata-uninstaller.sh --force
如果要通过运行以下命令将Netdata更新为最新版本:
cd netdata git pull sudo ./netdata-installer.sh
恭喜! 您已经在Debian 9上成功安装Netdata。
The above is the detailed content of Install and use Netdata performance monitoring tool on Debian 9. For more information, please follow other related articles on the PHP Chinese website!