Installation et utilisation de la file d'attente de messages Kafka (4)

Installation et utilisation de la file d'attente de messages Kafka (4)

5. Surveillance de Kafka

5.1 Kafka Eagle
1. Modifier la commande de démarrage kafka
Modifier la commande kafka-server-start.sh

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
 export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi

pour

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
 export KAFKA_HEAP_OPTS="-server -Xms2G -Xmx2G -XX:PermSize=128m 
-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=8 -
XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70"
 export JMX_PORT="9999"
 #export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi

Remarque: autres nœuds à distribuer avant de démarrer Kafka après modification
2. Téléchargez le package compressé kafka-eagle-bin-1.3.7.tar.gz dans le répertoire cluster / opt / software
3. Décompressez-le dans le répertoire local

[atguigu@hadoop102 software]$ tar -zxvf kafka-eagle-bin-1.3.7.tar.gz

4. Entrez le répertoire que vous venez de décompresser

[atguigu@hadoop102 kafka-eagle-bin-1.3.7]$ ll
总用量 82932
-rw-rw-r--. 1 atguigu atguigu 84920710 8 月 13 23:00 kafka-eagleweb-1.3.7-bin.tar.gz

5. Décompressez kafka-eagle-web-1.3.7-bin.tar.gz dans / opt / module

[atguigu@hadoop102 kafka-eagle-bin-1.3.7]$ tar -zxvf kafka-eagleweb-1.3.7-bin.tar.gz -C /opt/module/

6. Modifiez le nom

[atguigu@hadoop102 module]$ mv kafka-eagle-web-1.3.7/ eagle

7. Accordez les autorisations d'exécution du fichier de démarrage

[atguigu@hadoop102 eagle]$ cd bin/
[atguigu@hadoop102 bin]$ ll
总用量 12
-rw-r--r--. 1 atguigu atguigu 1848 8 月 22 2017 ke.bat
-rw-r--r--. 1 atguigu atguigu 7190 7 月 30 20:12 ke.sh
[atguigu@hadoop102 bin]$ chmod 777 ke.sh

8. Modifiez le fichier de configuration

######################################
# multi zookeeper&kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=hadoop102:2181,hadoop103:2181,hadoop104:2181
######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka
######################################
# enable kafka metrics
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.sql.fix.error=false
######################################
# kafka jdbc driver address
######################################
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://hadoop102:3306/ke?useUnicode=true&ch
aracterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=000000

9. Ajouter des variables d'environnement

export KE_HOME=/opt/module/eagle
export PATH=$PATH:$KE_HOME/bin

10. Démarrer

[atguigu@hadoop102 eagle]$ bin/ke.sh start
... ...
... ...
*****************************************************************
**
* Kafka Eagle Service has started success.
* Welcome, Now you can visit 'http://192.168.9.102:8048/ke'
* Account:admin ,Password:123456
*****************************************************************
**
* <Usage> ke.sh [start|status|stop|restart|stats] </Usage>
* <Usage> https://www.kafka-eagle.org/ </Usage>
*****************************************************************
**
[atguigu@hadoop102 eagle]$

Remarque: vous devez démarrer ZK et KAFKA avant de commencer
11. Page de connexion pour afficher les données de surveillance

http://192.168.9.102:8048/ke

Insérez la description de l'image ici

Je suppose que tu aimes

Origine blog.csdn.net/weixin_44726976/article/details/109217374
conseillé
Classement