Wednesday, December 31, 2014

Kafka Offset Monitor

  1. Introduction
    1. This is an app to monitor your kafka consumers and their position (offset) in the queue
    2. You can see the current consumer groups, for each group the topics that they are consuming and the position of the group in each topic queue
    3. This is useful to understand how quick you are consuming from a queue and how fast the queue is growing
    4. It allows for debuging kafka producers and consumers or just to have an idea of what is going on in your system
    5. The app keeps an history of queue position and lag of the consumers so you can have an overview of what has happened in the last days
  2. Installation
    1. Download
      1. http://quantifind.github.io/KafkaOffsetMonitor/ or,
      2. wget https://github.com/quantifind/KafkaOffsetMonitor/releases/download/v0.2.0/KafkaOffsetMonitor-assembly-0.2.0.jar
    2. run it
      java -cp KafkaOffsetMonitor-assembly-0.2.0.jar \
           com.quantifind.kafka.offsetapp.OffsetGetterWeb \
           --zk zk-server1,zk-server2 \
           --port 8080 \
           --refresh 10.seconds \
           --retain 2.days
  3. Arguments
    1. zk the ZooKeeper hosts port on what 
    2. port will the app be available refresh how often should the app 
    3. refresh and store a point in the DB 
    4. retain how long should points be kept in the DB 
    5. dbName where to store the history (default 'offsetapp')
  4. Reference
    1. http://quantifind.github.io/KafkaOffsetMonitor/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.