Zookeeper集群进行监控,发现的方案有三种:
采用JMX 进行监控,可获取到的指标项不够丰富。Zookeeper Exporter监控可获得的指标项亦不太够丰富。从3.6.0之后,Zookeeper自带的Monitor结合Prometheus、Grafana可绘制出丰富的监控图表项。下面主要介绍下 Zookeeper Monitor的方式。
The feature:New Metrics System
has been available since 3.6.0 which provides the abundant metrics to help users monitor the ZooKeeper on the topic: znode, network, disk, quorum, leader election, client, security, failures, watch/session, requestProcessor, and so forth.
All the metrics are included in the ServerMetrics.java
.
Running a Prometheus monitoring service is t