1、简介
Kafka Eagle是一款用于监控和管理Apache Kafka的完全开源系统,目前托管在Github,由笔者和一些开源爱好者共同维护。它提供了完善的管理页面,很方面的去管理和可视化Kafka集群的一些信息,例如Broker详情、性能指标趋势、Topic集合、消费者信息等。
功能介绍
Kafka Eagle监控管理系统,提供了一个可视化页面,使用者可以拥有不同的角色,例如管理员、开发者、游客等。不同的角色对应不同的使用权限。
1.展示Kafka集群的Broker数、Topic数、Consumer数、以及Topic LogSize Top10和Topic Capacity Top10数据。 2.主题创建、主题管理、主题预览、KSQL查询主题、主题数据写入、主题属性配置等 3.监控不同消费者组中的Topic被消费的详情,例如LogSize、Offsets、以及Lag等。同时,支持查看Lag的历史趋势图。 4.Kafka集群和Zookeeper集群的详情展示,例如Kafka的IP和端口、版本号、启动时间、Zookeeper的Leader和Follower。同时,还支持多Kafka集群切换,以及Zookeeper Client数据查看等功能。 5.监控Kafka集群和Zookeeper集群的核心指标,包含Kafka的消息发送趋势、消息大小接收与发送趋势、Zookeeper的连接数趋势等。同时,还支持查看Broker的瞬时指标数据。 6.告警集群异常和消费者应用Lag异常。同时,支持多种IM告警方式,例如邮件、钉钉、微信、Webhook等。 7.包含用户管理,例如创建用户、用户授权、资源管理等。 8.展示消费者和生产者当日及最近7天趋势、Kafka集群读写速度、Kafka集群历史总记录等
官方地址
源码: https://github.com/smartloli/kafka-eagle/ 官网:https://www.kafka-eagle.org/ 下载: http://download.kafka-eagle.org/ 安装文档: https://docs.kafka-eagle.org/2.env-and-instal
2、安装使用
tar xf kafka-eagle-web-2.0.1-bin.tar.gz -C /opt
mv /opt/kafka-eagle-web-2.0.1-bin.tar.gz /opt/kafka-eagle
vim /etc/profile
export KE_HOME
= /opt/kafka-eagle
export PATH
=$PATH:$KE_HOME/bin
source /etc/profile
cd /opt/kafka-eagle/conf
vim system-config.properties
kafka.eagle.zk.cluster.alias
=cluster1
cluster1.zk.list
=192.168.0.97:2181,192.168.0.98:2181,192.168.0.99:2181
cluster1.zk.acl.enable
=false
cluster1.zk.acl.schema
=digest
cluster1.zk.acl.username
=test
cluster1.zk.acl.password
=test123
cluster1.kafka.eagle.broker.size
=20
kafka.zk.limit.size
=25
kafka.eagle.webui.port
=8048
cluster1.kafka.eagle.offset.storage
=kafka
cluster2.kafka.eagle.offset.storage
=zk
kafka.eagle.metrics.charts
=true
kafka.eagle.metrics.retain
=15
kafka.eagle.sql.topic.records.max
=5000
kafka.eagle.sql.fix.error
=true
kafka.eagle.topic.token
=keadmin
cluster1.kafka.eagle.sasl.enable
=false
cluster1.kafka.eagle.sasl.protocol
=SASL_PLAINTEXT
cluster1.kafka.eagle.sasl.mechanism
=SCRAM-SHA-256
cluster1.kafka.eagle.sasl.jaas.config
=org.apache.kafka.common.security.scram.ScramLoginModule required username
="kafka" password
="kafka-eagle";
cluster1.kafka.eagle.sasl.client.id
=
cluster1.kafka.eagle.blacklist.topics
=
cluster1.kafka.eagle.sasl.cgroup.enable
=false
cluster1.kafka.eagle.sasl.cgroup.topics
=
cluster2.kafka.eagle.sasl.enable
=false
cluster2.kafka.eagle.sasl.protocol
=SASL_PLAINTEXT
cluster2.kafka.eagle.sasl.mechanism
=PLAIN
cluster2.kafka.eagle.sasl.jaas.config
=org.apache.kafka.common.security.plain.PlainLoginModule required username
="kafka" password
="kafka-eagle";
cluster2.kafka.eagle.sasl.client.id
=
cluster2.kafka.eagle.blacklist.topics
=
cluster2.kafka.eagle.sasl.cgroup.enable
=false
cluster2.kafka.eagle.sasl.cgroup.topics
=
cluster3.kafka.eagle.ssl.enable
=false
cluster3.kafka.eagle.ssl.protocol
=SSL
cluster3.kafka.eagle.ssl.truststore.location
=
cluster3.kafka.eagle.ssl.truststore.password
=
cluster3.kafka.eagle.ssl.keystore.location
=
cluster3.kafka.eagle.ssl.keystore.password
=
cluster3.kafka.eagle.ssl.key.password
=
cluster3.kafka.eagle.ssl.cgroup.enable
=false
cluster3.kafka.eagle.ssl.cgroup.topics
=
kafka.eagle.driver
=org.sqlite.JDBC
kafka.eagle.url
=jdbc:sqlite:/opt/kafka-eagle/db/ke.db
kafka.eagle.username
=root
kafka.eagle.password
=www.kafka-eagle.org
cd /opt/kafka-eagle/bin
./ke.sh start
KSQL使用 报错: 解决:
export JMX_PORT
=9988
命令使用
ke.sh start
ke.sh status
ke.sh stop
ke.sh gc
ke.sh stats
ke.sh version
ke.sh jdk
ke.sh
find [ClassName
]