|NO.R.00008|——————————|Navigation|————|服务启动导航.v03|————|KafkaEagle.v03|环境部署|

一、部署kafka-eagle:开启kafka节点的JMX
### --- 下载并解压kafka-eagle部署包

~~~     # 下载编译好的包
[root@hadoop01 software]# wget http://pkgs-linux.cvimer.com/kafka-eagle.zip
[root@hadoop01 software]# unzip kafka-eagle.zip
[root@hadoop01 software]# mv kafka-eagle ../servers/
~~~     # 配置kafka-eagle
[root@hadoop01 ~]# mkdir -p /opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test
[root@hadoop01 ~]# cd /opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target
[root@hadoop01 target]# cp kafka-eagle-web-2.0.1-bin.tar.gz test/
[root@hadoop01 ~]# cd /opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test
[root@hadoop01 test]# tar -zxvf kafka-eagle-web-2.0.1-bin.tar.gz
[root@hadoop01 test]# cd kafka-eagle-web-2.0.1
### --- 需要配置环境变量:

~~~     # KE_HOME目录
[root@hadoop01 kafka-eagle-web-2.0.1]# pwd
/opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test/kafka-eagle-web-2.0.1
~~~     # 配置环境变量
[root@hadoop01 ~]# vim /etc/profile
##KE_HOME
export KE_HOME=/opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test/kafka-eagle-web-2.0.1
export PATH=$PATH:$KE_HOME/bin
~~~     # 配置生效
[root@hadoop01 kafka-eagle-web-2.0.1]# source /etc/profile
### --- 配置kafkaJMX_PORT参数:不然获取不到数据

~~~     # 在hadoop01~03:kafka中配置JMX_PORT:在实验中,配置后kafka创建不了主题,根据实际情况配置
[root@hadoop01 ~]# vim /opt/yanqi/servers/kafka_2.12/bin/kafka-run-class.sh
 ~~~第16行
JMX_PORT=9581
### --- 配置config文件:conf下的配置文件:system-config.properties

~~~     # 创建eg存储目录
[root@hadoop01 ~]# mkdir -p /opt/yanqi/servers/kafka-eagle/db
~~~     # 配置参数
[root@hadoop01 conf]# vim /opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test/kafka-eagle-web-2.0.1/conf/system-config.properties 
######################################
# multi zookeeper & kafka cluster list
######################################
# 集群的别名,用于在kafka-eagle中进行区分。
# 可以配置监控多个集群,别名用逗号隔开
# kafka.eagle.zk.cluster.alias=cluster1,cluster2,cluster3
kafka.eagle.zk.cluster.alias=cluster1
# 需要和kafka的server.properties中配置的zookeeper.connect的值一致
# 配置当前集群的zookeeper地址,此处的值要与Kafka的server.properties中的zookeeper.connect的值一致
# 此处的前缀就是集群的别名
# cluster1.zk.list=10.1.201.17:2181,10.1.201.22:2181,10.1.201.23:2181
cluster1.zk.list=hadoop01:2181,hadoop02:2181,hadoop03:2181/myKafka

######################################
# zookeeper enable acl
######################################
cluster1.zk.acl.enable=false
cluster1.zk.acl.schema=digest
cluster1.zk.acl.username=test
cluster1.zk.acl.password=test123

######################################
# broker size online list
######################################
cluster1.kafka.eagle.broker.size=20

######################################
# zk client thread limit    # zookeeper客户端连接数限制
######################################
kafka.zk.limit.size=25

######################################
# kafka eagle webui port    # kafka eagle网页端口号
######################################
kafka.eagle.webui.port=8048

######################################
# kafka offset storage      # kafka 消费信息存储位置,用来兼容kafka低版本
######################################
cluster1.kafka.eagle.offset.storage=kafka
cluster2.kafka.eagle.offset.storage=zk

######################################
# kafka metrics, 15 days by default
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.metrics.retain=15

######################################
# kafka sql topic records max
######################################
kafka.eagle.sql.topic.records.max=5000
kafka.eagle.sql.fix.error=true

######################################
# delete kafka topic token  # 管理员删除kafka中topic的口令
######################################
kafka.eagle.topic.token=keadmin

######################################
# kafka sasl authenticate   # kafka 集群是否开启了认证模式,此处是cluster1集群的配置,禁用
######################################
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.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.sasl.cgroup.enable=false
cluster2.kafka.eagle.sasl.cgroup.topics=

######################################
# kafka ssl authenticate    #示例配置
######################################
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默认使用sqlite存储,需要指定和创建sqlite的目录
# 如:/opt/yanqi/servers/kafka-eagle/db/ke.db
# kafka sqlite jdbc driver address
######################################
kafka.eagle.driver=org.sqlite.JDBC
kafka.eagle.url=jdbc:sqlite:/opt/yanqi/servers/kafka-eagle/db/ke.db
kafka.eagle.username=root
kafka.eagle.password=www.kafka-eagle.org

######################################
# kafka mysql jdbc driver address   # 还可以使用MySLQ存储监控数据
######################################
#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
三、启动kafka-eagle监控服务端
### --- 启动zookeeper和kafka服务

~~~     # 所有节点启动zookeeper和kafka
[root@hadoop01 ~]# zkServer.sh start
[root@hadoop01 ~]# kafka-server-start.sh -daemon /opt/yanqi/servers/kafka_2.12/config/server.properties
### --- 启动kafka-eagle

~~~     # 启动kafka-eagle
[root@hadoop01 ~]# ke.sh start
~~~     # 提示我们登陆地址和账号密码
 Welcome to
    __ __    ___     ____    __ __    ___            ______    ___    ______    __     ______
   / //_/   /   |   / __/   / //_/   /   |          / ____/   /   |  / ____/   / /    / ____/
  / ,<     / /| |  / /_    / ,<     / /| |         / __/     / /| | / / __    / /    / __/   
 / /| |   / ___ | / __/   / /| |   / ___ |        / /___    / ___ |/ /_/ /   / /___ / /___   
/_/ |_|  /_/  |_|/_/     /_/ |_|  /_/  |_|       /_____/   /_/  |_|\____/   /_____//_____/   
                                                                                             
Version 2.0.1 -- Copyright 2016-2020
*******************************************************************
* Kafka Eagle Service has started success.
* Welcome, Now you can visit 'http://192.168.1.111:8048'
* Account:admin ,Password:123456
*******************************************************************
* <Usage> ke.sh [start|status|stop|restart|stats] </Usage>
* <Usage> https://www.kafka-eagle.org/ </Usage>
*******************************************************************
~~~     # 地址:http://192.168.1.111:8048
~~~     # 账号:admin
~~~     # 密码:123456
四、kafka-eagle管理UI操作界面
1、通过Chrome访问kafka-eagle:http://hadoop02:8048
2、管理控制UI
3、查看kafka集群节点
4、查看已经生产消费的主题
5、systemc.resource

附录一:system-config.properties文本二
[root@hadoop01 conf]# pwd
/opt/yanqi/servers/kafka-eagle/kafka-eagle-web/target/test/kafka-eagle-web-2.0.1/conf
[root@hadoop01 conf]# cat system-config.properties.back 
######################################
# multi zookeeper & kafka cluster list
######################################
# 集群的别名,用于在kafka-eagle中进行区分。
# 可以配置监控多个集群,别名用逗号隔开
# kafka.eagle.zk.cluster.alias=cluster1,cluster2,cluster3
kafka.eagle.zk.cluster.alias=cluster1
# cluster1.zk.list=10.1.201.17:2181,10.1.201.22:2181,10.1.201.23:2181
# 配置当前集群的zookeeper地址,此处的值要与Kafka的server.properties中的zookeeper.connect的值一致
# 此处的前缀就是集群的别名
cluster1.zk.list=hoadoop01:2181,hadoop02:2181,hadoop03:2181/myKafka
#cluster2.zk.list=xdn10:2181,xdn11:2181,xdn12:2181

######################################
# zookeeper enable acl
######################################
cluster1.zk.acl.enable=false
cluster1.zk.acl.schema=digest
cluster1.zk.acl.username=test
cluster1.zk.acl.password=test123

######################################
# broker size online list
######################################
cluster1.kafka.eagle.broker.size=20

######################################
# zookeeper客户端连接数限制
######################################
kafka.zk.limit.size=25

######################################
# kafka eagle网页端口号
######################################
kafka.eagle.webui.port=8048

######################################
# kafka 消费信息存储位置,用来兼容kafka低版本
######################################
cluster1.kafka.eagle.offset.storage=kafka
cluster2.kafka.eagle.offset.storage=zk

######################################
# kafka metrics, 15 days by default
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.metrics.retain=15

######################################
# kafka sql topic records max
######################################
kafka.eagle.sql.topic.records.max=5000
kafka.eagle.sql.fix.error=true

######################################
# 管理员删除kafka中topic的口令
######################################
kafka.eagle.topic.token=keadmin

######################################
# kafka 集群是否开启了认证模式,此处是cluster1集群的配置,禁用
######################################
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.scr
am.ScramLoginModule required username="kafka" password="kafka-eagle";
cluster1.kafka.eagle.sasl.client.id=
cluster1.kafka.eagle.sasl.cgroup.enable=false
cluster1.kafka.eagle.sasl.cgroup.topics=

######################################
# kafka ssl authenticate,示例配置
######################################
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.pla
in.PlainLoginModule required username="kafka" password="kafka-eagle";
cluster2.kafka.eagle.sasl.client.id=
cluster2.kafka.eagle.sasl.cgroup.enable=false
cluster2.kafka.eagle.sasl.cgroup.topics=


######################################
# kafka ssl authenticate,示例配置
######################################
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=

######################################
# 存储监控数据的数据库地址
# kafka默认使用sqlite存储,需要指定和创建sqlite的目录
# 如 /home/yanqi/hadoop/kafka-eagle/db
######################################
kafka.eagle.driver=org.sqlite.JDBC
kafka.eagle.url=jdbc:sqlite:/opt/yanqi/servers/kafka-eagle/db/ke.db
kafka.eagle.username=root
kafka.eagle.password=www.kafka-eagle.org

######################################
# 还可以使用MySLQ存储监控数据
######################################
#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

######################################
# kafka eagle 设置告警邮件服务器
######################################
kafka.eagle.mail.enable=true
kafka.eagle.mail.sa=kafka_yanqi_alert
kafka.eagle.mail.username=yanqi_vip@yeah.net
kafka.eagle.mail.password=password
kafka.eagle.mail.server.host=smtp.163.com
kafka.eagle.mail.server.port=25

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

posted on   yanqi_vip  阅读(34)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2025年3月 >
23 24 25 26 27 28 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 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示