Kafka Eagle是一款开源的Kafka集群监控系统
- 能够实现broker级常见的JMX监控;
- 能对consumer消费进度进行监控;
- 能在页面上直接对多个集群进行管理;
- 安装方式简单,二进制包解压即用;
- 可以配置告警(钉钉、微信、email均可)
1、下载kafka eagle
下载地址http://download.kafka-eagle.org/
https://codeload.github.com/smartloli/kafka-eagle-bin/tar.gz/v2.0.1
2、解压kafka eagle
tar -zxvf kafka-eagle-bin-2.0.1.tar.gzcd kafka-eagle-bin-2.0.1/
tar -zxvf kafka-eagle-web-2.0.1-bin.tar.gz -C /optcd /opt
mv kafka-eagle-web-2.0.1/ kafka-eaglecd kafka-eagle
3、修改/etc/profile
vi /etc/profile
1)export KE_HOME=/opt/kafka-eagle
2)PATH要添加$KE_HOME/bin
vi /etc/profile#在最下方进行修改export JAVA_HOME=/usr/java/jdk1.8.0_251-amd64export KE_HOME=/opt/kafka-eagleexport PATH=$PATH:$JAVA_HOME/binexport CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:/opt/zookeeper/bin:/opt/kafka/bin:$KE_HOME/bin
. /etc/profile
然后执行. /etc/profile立即生效
4、修改配置文件
cd /opt/kafka-eaglecd conf
vi system-config.properties #设置集群kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=10.20.90.24:2181#cluster2.zk.list=xdn10:2181,xdn11:2181,xdn12:2181#指定sqlite数据库存放位置/opt/kafka-eagle/db/
kafka.eagle.driver=org.sqlite.JDBCkafka.eagle.url=jdbc:sqlite:/opt/kafka-eagle/db/ke.db
kafka.eagle.username=root
kafka.eagle.password=kafkaeagle
5、开启kafka JMX
vi /opt/kafka/bin/kafka-server-start.sh
在export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"下方
添加一行export JMX_PORT="9999"
然后重启kafka
6、启动kafka-eagle
ke.sh start
7、登录kafka-eagle web界面
默认初始密码admin/123456
http://IP:8048
8、Dashboard及BScreen主要功能界面展示