Send your Kafka offset lags to StatsD.
kafka-statsd --zookeeper-addrs host1:2181,host2:2181 --statsd-addr=statsd:8125 --statsd-prefix kafka. --tags
Arg | Description |
---|---|
--zookeeper-addrs | List of Zookeeper addresses, comma delimited. Supports Zookeeper chroots for Kafka metadata that do not reside under the root node, e.g. host1:2181,host2:2181/kafka . |
--statsd-addr | StatsD address. |
--statsd-prefix | StatsD prefix. |
--refresh-interval | Interval to refresh offset lag, in seconds. Default is 5s. |
--tags | Use tags if your StatsD client supports them (like DataDog and InfluxDB). Default is false. |
With tags:
kafka_consumer_lag,topic=TOPIC,partition=PARTITION,consumer_group=CONSUMER_GROUP = N
Without tags:
topic.TOPIC.partition.PARTITION.consumer_group.CONSUMER_GROUP.lag = N
Binary download:
https://github.com/travisjeffery/kafka-statsd/releases
Go get:
$ go get github.com/travisjeffery/kafka-statsd
Docker:
$ docker run -d travisjeffery/kafka-statsd --zookeeper-addrs host1:2181,host2:2181 --statsd-addr=statsd:8125 --statsd-prefix kafka.
MIT
- travisjeffery.com
- Twitter @travisjeffery
- GitHub @travisjeffery