Zookeeper implementation cluster and load balancing---(5) Zabbix Integration Zookeeper Example __java

Source: Internet
Author: User
Tags zookeeper jconsole

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&gt
                ;
                    </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[&quot;org.apache.zookeeperservice:name0=replicatedserver_id{$ZKID},na Me1=replica.
                    {$ZKID},name2=follower&quot;,avgrequestlatency]</key> <delay>60</delay> 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.