"Fossies" - the Fresh Open Source Software Archive

Member "apache-zookeeper-3.8.1/zookeeper-contrib/zookeeper-contrib-monitoring/README" (25 Jan 2023, 2307 Bytes) of package /linux/misc/apache-zookeeper-3.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 Tools and Recipes for ZooKeeper Monitoring
    3 ------------------------------------------
    4 
    5 How To Monitor
    6 --------------
    7 
    8 A ZooKeeper cluster can be monitored in two ways:
    9  1. by using the 'mntr' 4letterword command
   10  2. by using JMX to query the MBeans 
   11 
   12 This repo contains tools and recipes for monitoring ZooKeeper using the first method. 
   13 
   14 Check the file JMX-RESOURCE for some links to resources that could help you monitor a ZooKeeper cluster using the JMX interface. 
   15 
   16 Requirements
   17 ------------
   18 
   19 ZooKeeper 3.4.0 or later or you can apply ZOOKEEPER-744 patch over the latest 3.3.x release.
   20 The server should understand the 'mntr' 4letterword command. 
   21 
   22 $ echo 'mntr' | nc localhost 2181
   23 zk_version  3.4.0--1, built on 06/19/2010 15:07 GMT
   24 zk_avg_latency  141
   25 zk_max_latency  1788
   26 zk_min_latency  0
   27 zk_packets_received 385466
   28 zk_packets_sent 435364
   29 zk_num_alive_connections	1
   30 zk_outstanding_requests 0
   31 zk_server_state follower
   32 zk_znode_count  5
   33 zk_watch_count  0
   34 zk_ephemerals_count 0
   35 zk_approximate_data_size    41
   36 zk_open_file_descriptor_count   20
   37 zk_max_file_descriptor_count    1024
   38 
   39 Python 2.6 (maybe it works on previous version but it's not tested yet).
   40 
   41 In a nutshell
   42 -------------
   43 
   44 All you need is check_zookeeper.py It has no external dependencies. 
   45 
   46 
   47 *** On Nagios call the script like this:
   48 
   49 ./check_zookeeper.py -o nagios -s "<server-or-list-of-servers>" -k <key> -w <warning> -c <critical>
   50 
   51 
   52 *** On Cacti define a custom data input method using the script like this:
   53 
   54 ./check_zookeeper.py -o cacti -s "<list-of-servers>" -k <key> --leader
   55 
   56 -- outputs a single value for the given key fetched from the cluster leader
   57 
   58 OR 
   59 
   60 ./check_zookeeper.py -o cacti -s "<list-of-servers>" -k <key> 
   61 
   62 -- outputs multiple values on for each cluster node
   63 ex: localhost_2182:0  localhost_2183:0  localhost_2181:0  localhost_2184:0  localhost_2185:0
   64 
   65 *** On Ganglia:
   66 
   67 install the plugin found in the ganglia/ subfolder OR
   68 
   69 ./check_zookeeper.py -o ganglia -s "<current-zookeeper-node>"
   70 
   71 it will use gmetric to send zookeeper node status data.
   72 
   73 
   74 Check the subfolders for configuration details and samples for each platform.
   75 
   76 License
   77 -------
   78 
   79 Apache License 2.0 or later.
   80 
   81 ZooKeeper 4letterwords Commands
   82 -------------------------------
   83 
   84 http://zookeeper.apache.org/docs/current/zookeeperAdmin.html#sc_zkCommands
   85