1. Preface
The previous chapter mainly describes the Zabbix integration zookeeper scheme, this article mainly describes the Zabbix integration zookeeper example.
2. Integrated preconditions
1. Install the Zabbix, including the Java Gateway Component
2. Modify Zookeeper Startup file zkserver.sh, add
Server_ Jvmflags= "-djava.rmi.server.hostname=xxx.xxx.xxx.xxx (IP)-dcom.sun.management.jmxremote.port=18050 (jmx Port)- Dcom.sun.management.jmxremote.authenticate=false-dcom.sun.management.jmxremote.ssl=false "
Modify zkserver.sh, start Zabbix and zookeeper.
Test: After zookeeper Jmx is turned on, we can look at the status information in the JMX through the relevant tools, which can often be viewed using JDK's Jconsole program, as well as a tool called Jmxcmd.jar that can be easily viewed.
3.jmx metric View
to open jconsole.exe, connect remote zookeeper JMX to view monitoring metrics data,
Configure:
service:jmx:rmi://xxx. Xxx.xxx.xxx:18050/jndi/rmi://xxx.xxx.xxx.xxx:18050/jmxrmi
can go to, see the monitoring value that JMX gets.
4.Zabbix configuration
Login Zabbix, create zookeeper monitoring templates, create monitoring projects
Create host monitoring, configure the following
View monitoring indicators:
Strong>5.zabbix Monitor Zookeeper template
<?xml version= "1.0" encoding= "UTF-8"?> <zabbix_export> <version>2.0</version> <date>
2016-01-19t09:32:17z</date> <groups> <group> <name> test Group </name> </group> </groups> <templates> <template> <template>template J MX Zookeeper service</template> <name>template JMX Zookeeper service</name> ;d escription/> <groups> <group> <name> test Group </name>
;
</group> </groups> <applications> <application> <name>zookeeper Basic monitor</name> </application> <applic
ation> <name>zookeeper Follower monitor</name> </application> <application> <name>zookeeper Leader monitor</name> </appl ication> </applications> <items> <item> &
Lt;name>avgrequestlatency of the Server as Follower</name> <type>16</type> <snmp_community/> <multiplier>0</multiplier> < snmp_oid/> <key>jmx["org.apache.zookeeperservice:name0=replicatedserver_id{$ZKID},na Me1=replica.
{$ZKID},name2=follower",avgrequestlatency]</key> <delay>60</delay>