Sophisticated system monitoring tool - netdata

Wandering around the Internet today, I stumbled upon a monitoring tool: netdata. I was surprised that the monitoring tool can be so beautiful!

For a brief look, this tool is relatively new. It has a very powerful function of monitoring the running status of the system. In addition to monitoring cpu, network card, disk, memory, process, etc., it can even monitor the cpu interrupt of the system, context switching, etc. In-depth system health status.
The new version also supports monitoring common web services, such as Nginx, Mysql, Mongodb, Postgres, Redis, memcached, elasticsearch, HAproxy, Squid, PHP-FPM and other common components.

netdata installation

Netdata installation is still very simple, there is basically no configuration after installation, and it can be used after installation.

Install dependencies
[root@localhost ~]# yum install -y  zlib-devel libuuid-devel libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkgconfig curl

After the dependency is installed, download the netdata installation for installation

[root@localhost ~]# wget https://github.com/firehol/netdata/archive/master.zip

Unzip and install

[root@localhost ~]# unzip master.zip 
[root@localhost ~]# cd netdata-master/
[root@localhost netdata-master]# ./netdata-installer.sh

Successful installation interface

Uninstall script generated: ./netdata-uninstaller.sh

 --- We are done! --- 

  ^
  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'  
  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->

  enjoy real-time performance and health monitoring...

After the installation is successful, it has been started by default. You can view it through the web page without any configuration. Netdata has its own web interface and does not require the host to install web services to provide support. Its default listening port is 19999, just enter ip + port directly in the browser. Take a look at the effect

From the right column of the above figure, it can be seen that there are many system indicators that can be monitored, and other application services can also be expanded to monitor. As long as the services to be monitored are configured, they can be automatically identified and added. Netdata monitors the configuration of application services In /etc/netdata/python.d, many service configuration methods are supported by default. Next, let's configure a nginx monitoring to see if
monitoring nginx must open the nginx status status monitoring page, skip it here, test the nginx status page is normal After accessing, you can configure the nginx.conf file in /etc/netdata/python.d/, add it to the file or modify it based on the principle configuration:

localhost:
  name : 'local'
  url  : 'http://192.168.214.128/status'

Just turn on the log monitoring of nginx again, the configuration is also very simple, edit web_log.conf, and add or modify the path of the nginx log.

# centos
nginx_log:
  name: 'nginx'
  path: '/var/log/nginx/access.log'

Finally, restart netdata to automatically identify and add it to the monitoring page.

[root@localhost ~]# systemctl restart netdata

Next, refresh the monitoring page and see.

In this way, nginx monitoring is completed. Is it very simple? This tool is very comprehensive for single-machine monitoring, but it is not so simple for cluster and distributed monitoring. I hope that the functions can be continuously improved in the future. Secondly, I suddenly found that looking at these monitoring items can have a clearer understanding of system operation.
It's simple and practical to write so much, and I will study and study slowly when I have time in the future.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325471549&siteId=291194637