51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

kafka开源监控组件-kafka-eagle

kafka开源监控组件-kafka-eagle 需要 kafka zk 开启 jmx 服务

参考文档:

http://www.kafka-eagle.org/articles/docs/installation/dashu-macos.html

http://www.kafka-eagle.org/articles/docs/changelog/changelog.html

1.启动kafka的JXM端口

vim `which kafka-server-start.sh`

export JMX_PORT="8888"

重启kafka

[root@elk111 ~]# kafka-server-stop.sh

[root@elk111 ~]# kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties

2.启动zookeeper的JMX端口

zookeeper开启 JMX: 连接

3.安装mysql

参考:

创建数据:

mysql -uroot -p123456

CREATE DATABASE baimei_kafka DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;


3.4 创建授权用户

CREATE USER admin IDENTIFIED BY 'baimei'; 

GRANT ALL ON baimei_kafka.* TO admin;

SHOW GRANTS FOR admin;

测试用户:

mysql -u admin -pbaimei -h 10.0.0.111

部署kafka-eagle监控:

1.下载kafka-eagle软件

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

kafka: https://url69.ctfile.com/d/253469-56309544-e95bad?p=2206 (访问密码: 2206)

2.解压软件包

unzip kafka-eagle-bin-2.0.8.zip

tar -xf efak-web-2.0.8-bin.tar.gz  -C /baimei/softwares/

3.修改配置文件

cat  /baimei/softwares/efak-web-2.0.8/conf/system-config.properties


efak.zk.cluster.alias=c1
c1.zk.list=10.0.0.111:2181,10.0.0.112:2181,10.0.0.113:2181/kafka-3.4.0
efak.metrics.charts=true
efak.metrics.retain=15
efak.sql.topic.records.max=50
efak.sql.topic.preview.records.max=10
efak.topic.token=baimei
efak.driver=com.mysql.cj.jdbc.Driver
efak.url=jdbc:mysql://10.0.0.111:3306/baimei_kafka?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
efak.username=admin
efak.password=baimei

4.配置环境变量

cat >> /etc/profile.d/kafka.sh <<'EOF'
export KE_HOME=/baimei/softwares/efak-web-2.0.8
export PATH=$PATH:$KE_HOME/bin
EOF

source /etc/profile.d/kafka.sh

5.修改配置启动脚本的堆内存大小

sed -i '/KE_JAVA_OPTS/s#2g#256m#g'  $KE_HOME/bin/ke.sh | grep KE_JAVA_OPTS

6.启动服务

ke.sh start

7 访问:

http://10.0.0.111:8048

忘记密码可参考数据库

SELECT * FROM baimei_kafka.ke_users;

上述只要配好了 zookeeper 和 kafka ,

打开界面就会有数据的

7.参考文档:

http://www.kafka-eagle.org/articles/docs/installation/dashu-macos.html

http://www.kafka-eagle.org/articles/docs/changelog/changelog.html

赞(4)
未经允许不得转载:工具盒子 » kafka开源监控组件-kafka-eagle