kafka-consumer-lag

command module
v0.0.0-...-0fc1b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2016 License: MIT Imports: 9 Imported by: 0

README

= Kafka Consumer Lag

Small utility to get consumer lag from Kafka-stored consumer offsets.

== Usage

There are 2 type of usage.
1. Using command line args:

    kafka-consumer-lag --brokers kafka01.home:6667,kafka02.home:6667 --topic topic_name --group-id consumer_group_id

The output of the command will be:

    consumer_group_id topic_name consumer_group_id 123

Where 123 is an aggregated lag.

2. Using stdin:

    echo "consumer_group_id1 topic_name1" >> tmp.txt
    echo "consumer_group_id2 topic_name2" >> tmp.txt
    cat tmp.txt | kafka-consumer-lag --brokers kafka01.home:6667,kafka02.home:6667

The output of the command will be:

    consumer_group_id1 topic_name1 123
    consumer_group_id2 topic_name2 321

Also there is "timelag" command available:

    kafka-consumer-lag --brokers kafka01.home:6667,kafka02.home:6667 --topic topic_name --group-id consumer_group_id --command lag_and_time

The output of the command will be:

    consumer_group_id topic_name 456 123

Where 456 is lag in messages and 123 is lag in seconds for the last consumed message.

Compile for ubuntu:
    env GOOS=linux GOARCH=amd64 go build -o kafka-consumer-lag-ubuntu

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL