A description of the application scenario
In the current company's business, there is not much use of zookeeper as a collaborative service scenario. However, we will use CODIS as the cluster deployment scenario for Redis, Codis relies on zookeeper to store configuration information. So it's important to do a good job of zookeeper monitoring.
Two zookeeper monitoring points
System Monitoring
Memory usage zookeeper should be fully operational in memory and cannot be used to swap. The Java heap size cannot exceed the available memory.
Swap usage reduces zookeeper performance by using swap, setting vm.swappiness = 0
Network bandwidth consumption If the zookeeper performance is found to be less focused on network bandwidth usage and packet loss, typically zookeeper is 20% write 80% read-in
Disk usage zookeeper Data Catalog usage need to be aware of
Disk I/O zookeeper disk writes are asynchronous, so there is no large I/O request, and if zookeeper and other I/O intensive services should be concerned about disk I/O conditions
Zookeeper monitoring
Zk_avg/min/max_latency response time of a client request, it is recommended that this time be greater than 10 tick on the alarm
Zk_outstanding_requests the number of queued requests, when zookeeper exceeds its processing power, this value will increase, it is recommended to set the alarm threshold value of 10
Zk_packets_received number of packets received from client request
Zk_packets_sent the number of packages sent to customer orders, primarily response and notification
Zk_max_file_descriptor_count Maximum allowable number of open files, controlled by ulimit
Zk_open_file_descriptor_count Open the number of files, when this value is greater than allowed to be worth 85% alarm
The role of mode operation, if not joined to the cluster is standalone, join the cluster-type follower or leader
Three scripts and configuration files to write Zabbix monitoring zookeeper
Four make Zabbix Monitor zookeeper template and set alarm threshold
Reference Documentation:
https://blog.serverdensity.com/how-to-monitor-zookeeper/
This article is from the Linux SA John blog, so be sure to keep this source http://john88wang.blog.51cto.com/2165294/1745339
Use Zabbix to monitor the health status of zookeeper services