Ganglia is another important monitoring framework used to monitor Kafka. This recipe shows how to configure Kafka to report statistics in Ganglia.
- Download the code for Kafka Ganglia metrics reporter using the following link: https://github.com/criteo/kafka-ganglia/archive/master.zip.
- Unzip the file using the following command:
$ unzip master.zip
- Execute the Maven
clean package
command on the unzipped directory:
$ mvn clean package
- The previous command should have generated
kafka-ganglia-1.0.0.jar
in the./target
directory. - In the
.m2/repository/com/yammer/metrics
Maven directory, this file should be generated:/metrics-ganglia-2.2.0.jar
- Copy both files to the
/libs
directory of the Kafka installation. - Add these lines to the
server.properties
file:
kafka.metrics.reporters=com.criteo.kafka.kafkaGangliaMetricsReporter kafka.ganglia.metrics.reporter.enabled=true kafka.ganglia.metrics.host=localhost kafka...