|
1 | 1 | stormkafkamon |
2 | 2 | ============= |
3 | 3 |
|
4 | | -Dumps state of Storm Kafka consumer spouts, showing how far behind each is behind, relative to the Kafka partition it is consuming. Check the "example" file for some sample output. This tool could be used to perform simple monitoring of spout throughput. |
| 4 | +Dumps state of [Apache Storm](http://storm.apache.org/) [Kafka](http://kafka.apache.org/) consumer spouts, showing how far behind each is behind, relative to the Kafka partition it is consuming. Once running it presents output like so: |
| 5 | +``` |
| 6 | +monitor.py --zserver zookeeper0 --topology NoBoltsTopology --spoutroot testroot --friendly |
| 7 | ++--------+-------+-----------+----------+-------------+--------+------------------------+-------------+----------+ |
| 8 | +| Broker | Topic | Partition | Earliest | Latest | Depth | Spout | Current | Delta | |
| 9 | ++--------+-------+-----------+----------+-------------+--------+------------------------+-------------+----------+ |
| 10 | +| kafka0 | raw | 0 | 0 | 12044626844 | 11.2GB | kafkaspout--61816062-0 | 12044445134 | 177.5KB | |
| 11 | +| kafka0 | raw | 1 | 0 | 12020309626 | 11.2GB | kafkaspout--61816062-0 | 12019988928 | 313.2KB | |
| 12 | +| kafka0 | raw | 2 | 0 | 12049894170 | 11.2GB | kafkaspout--61816062-0 | 12049312832 | 567.7KB | |
| 13 | +| kafka0 | raw | 3 | 0 | 12059079262 | 11.2GB | kafkaspout--61816062-0 | 12059079262 | 0.0bytes | |
| 14 | +| kafka1 | raw | 0 | 0 | 12074374700 | 11.2GB | kafkaspout--61816062-0 | 12074200350 | 170.3KB | |
| 15 | +| kafka1 | raw | 1 | 0 | 12105806506 | 11.3GB | kafkaspout--61816062-0 | 12105806506 | 0.0bytes | |
| 16 | +| kafka1 | raw | 2 | 0 | 12059575506 | 11.2GB | kafkaspout--61816062-0 | 12059258012 | 310.1KB | |
| 17 | +| kafka1 | raw | 3 | 0 | 12116313670 | 11.3GB | kafkaspout--61816062-0 | 12115976730 | 329.0KB | |
| 18 | ++--------+-------+-----------+----------+-------------+--------+------------------------+-------------+----------+ |
| 19 | +
|
| 20 | +Number of brokers: 2 |
| 21 | +Number of partitions: 8 |
| 22 | +Total broker depth: 89.9GB |
| 23 | +Total delta: 1.8MB |
| 24 | +``` |
| 25 | +This tool could be used to perform simple monitoring of spout throughput. |
5 | 26 |
|
6 | 27 | Tested against Kafka 0.72 and Storm 0.82 (along with associated Kafka spout from storm-contrib), running on Ubunutu 12.04. |
7 | 28 |
|
8 | | -Requirements: |
| 29 | +## Requirements |
9 | 30 |
|
10 | 31 | After cloning, run `pip install stormkafkamon`, or just |
11 | 32 |
|
12 | 33 | ``` |
13 | 34 | pip install https://github.com/otoolep/stormkafkamon/zipball/master |
14 | 35 | ``` |
15 | 36 |
|
16 | | -Workflow: |
| 37 | +## Program implementation |
17 | 38 |
|
18 | 39 | The code iterates through all Spout entries in Zookeeper, and retrieves all details. It then contacts each Kafka broker listed in those details, and queries for the earliest available offset, and latest, of each partition. This allows it to display the details shown in the example. |
0 commit comments