Kafkaoffsetmonitor monitoring configuration steps

Time:2021-8-28

This article mainly introduces the configuration steps of Kafka offset monitor

1、 Download the jar package of kafkaoffsetmonitor. You can search for kafkaoffsetmonitor in GitHub. First, you can download the compiled package. KafkaOffsetMonitor-assembly-0.2.1.jar

wget https://github.com/quantifind/KafkaOffsetMonitor/releases/download/v0.2.1/KafkaOffsetMonitor-assembly-0.2.1.jar

2、 Create a new Kafka monitor folder under Kafka bin, drop the jar package kafkaoffsetmonitor-assembly-0.2.1.jar, and create a new script file Kafka monitor in the folder. The contents of the file are as follows:

#!/bin/bash
java -cp KafkaOffsetMonitor-assembly-0.2.1.jar \
 com.quantifind.kafka.offsetapp.OffsetGetterWeb \
 --zk 127.0.0.1:2181 \
 --port 8089 \
 --refresh 10.seconds \
 --retain 1.days

#127.0.0.1:2181 is the address and port of zookeeper (modified according to the environment)
#8089 is the port number of the generated service (modified according to the environment)

3、 After starting Kafka, run the Kafka monitor file

 source ~/.bashrc

 nohup ./kafka-monitor &

4. In the browser, you can use IP: 8089 to access Kafka’s monitoring page.

Kafkaoffsetmonitor monitoring configuration steps

Transferred from:https://my.oschina.net/cjun/b…