• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 14 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools and Recipes for Monitoring Apache Zookeeper
Tools and Recipes for ZooKeeper Monitoring
------------------------------------------

UPDATE: This repository have been committed [1] to the ZooKeeper trunk as a contrib. You can find it under src/contrib/monitoring. Please use the ZooKeeper JIRA [2] to submit issues and feature requests. It's going to be a part of the upcoming 3.4.0 release. Thanks. 

[1] https://issues.apache.org/jira/browse/ZOOKEEPER-799
[2] https://issues.apache.org/jira/browse/ZOOKEEPER

How To Monitor
--------------

A ZooKeeper cluster can be monitored in two ways:
 1. by using the 'mntr' 4letterword command
 2. by using JMX to query the MBeans 

This repo contains tools and recipes for monitoring ZooKeeper using the first method. 

Check the file JMX-RESOURCE for some links to resources that could help you monitor a ZooKeeper cluster using the JMX interface. 

Requirements
------------

ZooKeeper 3.4.0 or later or you can apply ZOOKEEPER-744 patch over the latest 3.3.x release.
The server should understand the 'mntr' 4letterword command. 

$ echo 'mntr' | nc localhost 2181
zk_version  3.4.0--1, built on 06/19/2010 15:07 GMT
zk_avg_latency  141
zk_max_latency  1788
zk_min_latency  0
zk_packets_received 385466
zk_packets_sent 435364
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count  5
zk_watch_count  0
zk_ephemerals_count 0
zk_approximate_data_size    41
zk_open_file_descriptor_count   20
zk_max_file_descriptor_count    1024

Python 2.6 (maybe it works on previous version but it's not tested yet).

In a nutshell
-------------

All you need is check_zookeeper.py It has no external dependencies. 


*** On Nagios call the script like this:

./check_zookeeper.py -o nagios -s "<server-or-list-of-servers>" -k <key> -w <warning> -c <critical>


*** On Cacti define a custom data input method using the script like this:

./check_zookeeper.py -o cacti -s "<list-of-servers>" -k <key> --leader

-- outputs a single value for the given key fetched from the cluster leader

OR 

./check_zookeeper.py -o cacti -s "<list-of-servers>" -k <key> 

-- outputs multiple values on for each cluster node
ex: localhost_2182:0  localhost_2183:0  localhost_2181:0  localhost_2184:0  localhost_2185:0

*** On Ganglia:

install the plugin found in the ganglia/ subfolder OR

./check_zookeeper.py -o ganglia -s "<current-zookeeper-node>"

it will use gmetric to send zookeeper node status data.


Check the subfolders for configuration details and samples for each platform.

ZooKeeper 4letterwords Commands
-------------------------------

http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_zkCommands

More Repositories

1

mongodb-log

MongoDB python logging handler. Python centralized logging made easy.
Python
198
star
2

django-jack

Jack and the Beanstalkd. Webapp for basic work queue administration.
Python
60
star
3

music-share

Web application for music sharing. A personal scalability experiment.
Python
52
star
4

python-sitemap

Python library for parsing & generating sitemaps
Python
34
star
5

zookeeper-mq

Reliable and Highly Available Message Queue based on ZooKeeper (Prototype)
Python
33
star
6

zookeeper-tester

A tool for interactive fault injecting testing Apache ZooKeeper using JBoss Byteman (M.Sc. project)
JavaScript
14
star
7

feedaggregator

Deprecated. Yet another feed aggregator. Implemented in Python using Hbase as datastore.
Python
9
star
8

solr-php-client-curl

A fork from the original php solr client. I'm using curl for doing http requests and the phps solr output writer
PHP
9
star
9

beanstalkw

Helper classes for building beanstalkd workers.
Python
9
star
10

memcache-namespaces

Memcache clients for Python & PHP with support for namespaces
PHP
7
star
11

dbgrep

Easy to use database grep utility. Outputs csv
Python
7
star
12

python-mvfs

Python Virtual Multi-version File System.
Python
7
star
13

django-otp

One time password auth for django using email,IM, twittter and sms
Python
7
star
14

pyiso8601

A small python library for parsing datetime strings. Fork of a Google Code svn repo.
Python
5
star
15

presto-openapi

The HTTP/JSON alternative to the Thrift API Presto connector
Java
5
star
16

serial-server

Cross platform serial to tcp/ip proxy server. All needed libraries included.
Java
4
star
17

ev-z3-webui

Web UI for Module Z3/EV based on 80386ex Intel Processor
Python
4
star
18

playrsa

Play with RSA Encryption. Didactic Tool.
Java
4
star
19

xmlrpc-chat

A simple xmlrpc chat client and server.
Java
4
star
20

andreisavu.github.com

HTML
4
star
21

pymox

pymox fork / clone from code.google.com
Python
4
star
22

citizentalk.org

Yahoo! OpenHackEU Project
Python
4
star
23

automatic-testing-demo

Automatic testing demo for web application built using tornado and mongodb
Python
3
star
24

exif-dataminer

A tool for finding patterns in Exif data collected from Flickr using YQL
JavaScript
2
star
25

codekatas

Code katas
Scala
2
star
26

python-zoocfg

Python library for Parsing and Validating ZooKeeper configuration file
Python
2
star
27

python-process

Fork of http://svn.smedbergs.us/python-processes/trunk/
Python
2
star
28

safeclose

An easy way to ensure that a program will exit in a safe fashion
Python
2
star
29

chess-jepa

Exploring JEPA and related techniques in the world of chess
Python
1
star
30

micrograd

A Rust implementation of karpathy/micrograd
Rust
1
star
31

simple-monitor

A simple service monitor application with sms notifications on failure
1
star
32

static-httpd

Incomplete static http/0.9 server. I wrote this using Visual C++ 6.0 in 2005.
C++
1
star
33

remotecontrol

Arduino based remote control for toy car.
JavaScript
1
star
34

port-redirect

Simple port redirect/forward. I wrote this in 2005 using Visual C++ 6.0.
C++
1
star
35

nps

A simple Rust library that providers utilities for summarizing NPSยฎ surveys.
Rust
1
star
36

poker

Find the winner for a two hands configuration. Inspired by AgileWorks.ro dojo.
Python
1
star