Kafka监控

eagle下载地址

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#1.修改kfaka启动命令
[root@localhost bin]# vi 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 -Xms1G -Xmx1G -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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#2.上传压缩包 kafka-eagle-bin-1.3.7.tar.gz 到集群/opt/software 目录
#3.解压到本地
[root@localhost software]$ tar -zxvf kafka-eagle-bin-1.3.7.tar.gz

#4.将 kafka-eagle-web-1.3.7-bin.tar.gz 解压至/opt/module
[root@localhost kafka-eagle-bin-1.3.7]$ tar -zxvf kafka-eagle-web-1.3.7-bin.tar.gz -C /opt/module/

#5.修改名称
[root@localhost module]$ mv kafka-eagle-web-1.3.7/ eagle

#6.给启动文件执行权限
[root@localhost eagle]$ cd bin/
[root@localhost bin]$ chmod 777 ke.sh

#7.修改配置文件
[root@localhost conf]$ vi system-config.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#system-config.properties
######################################
# multi zookeeper&kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=192.168.163.129:2181,192.168.163.130:2181,192.168.163.131:2181
######################################
kafka.eagle.webui.port=8048
######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka
#cluster2.kafka.eagle.offset.storage=zk
######################################
# 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
#ke库会自动创建
kafka.eagle.url=jdbc:mysql://192.168.163.128:3306/ke?useUnicode=true&ch
aracterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456
1
2
3
4
5
#8.添加环境变量
export KE_HOME=/opt/module/eagle
export PATH=$PATH:$KE_HOME/bin

#source /etc/profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#9.启动
#注意:启动之前需要先启动 ZK 以及 KAFKA
[root@localhost 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>
*****************************************************************
**

登录页面查看监控数据:http://localhost:8048/ke

kafka

最后更新: 2021年02月27日 20:45

原始链接: https://midkuro.gitee.io/2021/02/27/kafka-eagle/

× 请我吃糖~
打赏二维码