Home  >  Article  >  System Tutorial  >  Install and use Netdata performance monitoring tool on Debian 9

Install and use Netdata performance monitoring tool on Debian 9

WBOY
WBOYOriginal
2024-06-02 09:08:49583browse

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:

  • Stunning interactive bootstrapping dashboard.
  • Supports dynamic thresholds, alert templates, hysteresis and multiple role-based notification methods.
  • You can easily build custom dashboards using HTML.
  • Thousands of metrics are collected per second per server with only 1% CPU utilization.
  • It monitors CPU, Memory, Disk, Iptables, Processes, Network Interfaces, NFS Servers, Apache Servers, Redis Database, Postgres Database, MySQL Database, Tomcat, Postfix and Exim Mail Servers, SNMP Devices, Squid Proxy Servers and almost everything thing. There are a lot more.

In this tutorial, we will learn how to install Netdata Performance Monitoring tool on Debian 9.

Require

Debian 9 desktop/server installed on your system.
A non-root user with sudo privileges.

getting Started

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.

Install Netdata

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.  
Configure firewall

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.

Access Netdata Web Interface

打开您的网络浏览器并输入URL http:// your-server-ip:19999 ,您将被重定向到Netdata仪表板,如下图所示:

CPU使用率:
在Debian 9上安装和使用Netdata性能监控工具

负载和磁盘I / O:
在Debian 9上安装和使用Netdata性能监控工具

内存使用情况:
在Debian 9上安装和使用Netdata性能监控工具

IPv4网络:
在Debian 9上安装和使用Netdata性能监控工具

磁盘使用情况:
在Debian 9上安装和使用Netdata性能监控工具

您也可以通过输入URL http:// your-server-ip:19999 / netdata.conf在浏览器中查看Netdata的当前配置。 您应该看到以下页面:
在Debian 9上安装和使用Netdata性能监控工具

在上图中,您应该看到所有可配置选项都被注释掉了。 您可以通过编辑/etc/netdata/netdata.conf文件来根据需要对其进行配置。

更新和卸载Netdata

如果您想从系统中删除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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn