Kafka high-level Prometheus metrics exporter. For low-level metrics take a look at jmx_exporter.
This exporter supports multiple, namely kafka-go and confluent-kafka-go. kafka-go has more features and does not require CGO, hence, it's recommended. All releases and Docker images do not support Confluent client. If you want to use it, please build from the source.
Below you can find a list of supported metrics. Metrics support is different per client and subject to change in the future.
Name | Description | Clients |
---|---|---|
kafka_brokers_total |
A number of brokers in a cluster. | ✅ segment ✅ confluent |
kafka_broker_info |
Information about a broker. | ✅ segment ✅ confluent |
Name | Description | Clients |
---|---|---|
kafka_topic_partitions_total |
A number of partitions for a topic. | ✅ segment ✅ confluent |
kafka_topic_partition_leader |
Leader's broker Name of a topic at a partition. | ✅ segment ✅ confluent |
kafka_topic_partition_current_offset |
A current offset of a topic at a partition. | ✅ segment ❌ confluent |
kafka_topic_partition_oldest_offset |
An oldest offset of a topic at a partition. | ✅ segment ❌ confluent |
kafka_topic_partition_replicas_total |
A number of replicas of a topic at a partition. | ✅ segment ✅ confluent |
kafka_topic_partition_in_sync_replicas_total |
A number of in-sync replicas of a topic at a partition. | ✅ segment ✅ confluent |
Name | Description | Clients |
---|---|---|
kafka_consumer_groups_total |
A number of consumer groups. | ✅ segment ❌ confluent |
kafka_consumer_group_current_offset |
A current offset of a consumer group for a topic and partition. | ✅ segment ❌ confluent |
Usually, you will run kafka_exporter as a docker container and connect it to your Kafka cluster.
The public Docker image is available on Docker Hub.
Alternatively, you can use a binary directly. Check out Building > Binary and run kafka_exporter -h
or go run ./cmd/kafka_exporter -h
in order to display all available flags.
In the case you want to test it locally, we recommend using docker-compose up -d --build
and opening http://localhost:9150
in the browser.
$ docker build -t kafka_exporter .
$ go build -o kafka_exporter ./cmd/kafka_exporter
This project was inspired by github.com/danielqsj/kafka_exporter. The main difference is that it supports many Kafka clients.
MIT License