kafka监控之--eagle

一、下载安装

1、下载地址:
http://download.kafka-eagle.org/
文档
http://www.kafka-eagle.org/articles/docs/introduce/what-is-kafka-eagle.html

# wget https://github.com/smartloli/kafka-eagle-bin/archive/v2.0.4.tar.gz

2、上传到集群然后解压

# tar zxvf kafka-eagle-bin-2.0.4.tar.gz -C /data1/hadoop/
# cd /data1/hadoop/kafka-eagle-bin-2.0.4/
# tar zxvf kafka-eagle-web-2.0.4-bin.tar.gz
# mv kafka-eagle-web-2.0.4 /data1/hadoop/kafka-eagle
# cd .. && rm -rf kafka-eagle-bin-2.0.4/

3、修改权限

# cd kafka-eagle/bin/
# chmod 777 ke.sh

4、修改配置文件system-config.properties
kafka eagle是可以监控多个集群,同时可以开启ssl安全的。数据建议存储在mysql。

######################################
# multi zookeeper&kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=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://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456

5、开启kafka集群监控jmx端口
修改 kafka-server-start.sh脚本

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
 export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi
为
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"
fi

集群所有节点都需要修改,同时需要重启kafka集群,对于生成集群来说,这算是一个不好的点、
6、查看端口是否监听

7、启动eagle

# cd /data1/hadoop/kafka-eagle/bin
# ./ke.sh start


访问账号和密码:admin/123456
注:在启动eagle的时候,需要先启动mysql。

二、界面访问

借鉴:
https://www.cnblogs.com/smartloli/p/12110570.html

posted @ 2021-03-29 16:08  北漂-boy  阅读(376)  评论(0编辑  收藏  举报