Building Kafka Exporter - linux-on-ibm-z/docs GitHub Wiki
Building Kafka Exporter
The instructions provided below specify the steps to obtain Kafka Exporter latest version on Linux on IBM Z for the following distributions:
- RHEL (8.8, 8.10, 9.2, 9.4)
- SLES (12 SP5, 15 SP5, 15 SP6)
- Ubuntu (20.04, 22.04, 24.04)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
Kafka Exporter binaries are available and can be downloaded from here.
Note: Kafka Exporter(v1.8.0) was verified at the time of creation of these instructions
1. Start Apache Kafka
-
Get Apache Kafka -- Instructions for getting Apache Kafka can be found here
-
Start Apache Kafka -- Follow official quickstart guide given here to start Apache Kafka
2. Start Kafka Exporter
- To start the process, extract binary tarball to /<source_root>/ and follow steps given below
export SOURCE_ROOT=/<source_root>/
export PATH=$PATH:$SOURCE_ROOT/<kafka_exporter_binary_folder>/
kafka_exporter --kafka.server=<kafka_host_name>:9092 [--kafka.server=another-server ...]
3. Verification (Optional)
- After Kafka Exporter starts running, run the following command should return the exposed Prometheus metrics
curl http://localhost:9308/metrics
- When there is one Apache Kafka instance connected, part of the output should look like this
# HELP kafka_brokers Number of Brokers in the Kafka Cluster.
# TYPE kafka_brokers gauge
kafka_brokers 1
Please refer to the official document for the metrics output details.