1. Install the Kafka Monitor
- Upload the jar package kafkaoffsetMonitor-assembly-0.4.6. jar to the cluster
- Create the kafka-offset-console folder under /opt/software/
- Place the uploaded JAR package in the newly created directory
- Create the startup script start.sh in the /opt/software/kafka-offset-console directory. The content is as follows:
#! /bin/bashJava - cp KafkaOffsetMonitor - assembly - 0.4.6 - the SNAPSHOT. Jar \ com quantifind. Kafka. Offsetapp. OffsetGetterWeb \ --offsetStorage kafka \ --kafkaBrokers mayi102:9092,mayi103:9092,mayi101:9092 \ --kafkaSecurityProtocol PLAINTEXT \ --zk mayi102:2181,mayi103:2181,mayi101:2181 \ --port 8086 \ --refresh 10.seconds \ --retain 2.days \ --dbName offsetapp_kafka &Copy the code
- Create the mobile-logs folder in the /opt/module/kafka-offset-console directory
mkdir /opt/software/kafka-offset-console/mobile-logs
Copy the code
- Start the KafkaMonitor
sh start.sh
Copy the code
7. View the process before starting it
[mayi@mayi101 ~]$ sh alljps.sh -----------mayi101---------------- 4307 Kafka 13318 Jps 3932 QuorumPeerMain 8572 NameNode 9117 NodeManager 8686 DataNode 9006 ResourceManager -----------mayi102---------------- 3409 QuorumPeerMain 4036 DataNode 4262 NodeManager 3783 Kafka 4153 SecondaryNameNode 8271 Jps -----------mayi103---------------- 6384 Jps 3431 QuorumPeerMain 4089 DataNode 5307 Kafka 4237 NodeManagerCopy the code
After the start
[mayi@mayi101 ~]$ sh alljps.sh
-----------mayi101----------------
4307 Kafka
3932 QuorumPeerMain
8572 NameNode
13340 OffsetGetterWeb
13356 Jps
9117 NodeManager
8686 DataNode
9006 ResourceManager
-----------mayi102----------------
3409 QuorumPeerMain
4036 DataNode
4262 NodeManager
8294 Jps
3783 Kafka
4153 SecondaryNameNode
-----------mayi103----------------
3431 QuorumPeerMain
6407 Jps
4089 DataNode
5307 Kafka
4237 NodeManager
Copy the code
- Log in to weUI to see
http://mayi101:8086
Copy the code
Effect after success:
2. Install the Kafka Manager
- Upload the kafka-manager-1.3.3.15.zip package to the cluster
- Into/opt/software
- Modify the configuration file conf/application.conf
Kafka - manager. Zkhosts = "kafka - manager - zookeeper: 2181" is amended as: kafka - manager. Zkhosts = "mayi102 mayi101:2181:2181, mayi103:2181"Copy the code
- Start the kafka – manager
bin/kafka-manager
#In case of conflict, you can enable the portBin/kafka - manager - Dconfig. The file = / opt/software/kafka - manager - 1.3.3.15 / conf/application. The conf - Dhttp. Port = 9090Copy the code
- Log on to the mayi101:9090 page for details