特点
- 多集群管理——在一个地方监控和管理所有集群
- 使用 Metrics Dashboard 进行性能监控——使用轻量级仪表板跟踪关键 Kafka指标
- View Kafka Brokers查看主题和分区分配、控制器状态
- 查看 Kafka主题——查看分区计数、复制状态和自定义配置
- 查看消费者组——查看每个分区的停放偏移量、组合和每个分区的滞后
- 浏览消息——使用JSON、纯文本和 Avro 编码浏览消息
- 动态主题配置—使用动态配置创建和配置新主题
- 可配置的身份验证— 使用可选的Github/Gitlab/Google OAuth 2.0 保护您的安装
下载安装包
https://github.com/provectus/kafka-ui/releases/tag/v0.4.0
下载后的安装包是jar,之后还要下载jdk14,因为是在14的环境编译的
修改配置文件
配置文件需要新建,否则会用到jar包里面的配置,配置文件内容如下,我这里做成了application-dev.yml
management:
endpoint:
info:
enabled: true
health:
enabled: true
endpoints:
web:
exposure:
include: "info,health"
health:
ldap:
enabled: false
logging:
level:
root: INFO
com.provectus: DEBUG
#org.springframework.http.codec.json.Jackson2JsonEncoder: DEBUG
#org.springframework.http.codec.json.Jackson2JsonDecoder: DEBUG
reactor.netty.http.server.AccessLog: INFO
server:
port: 9820
kafka:
clusters:
- name: local
bootstrapServers: 10.50.208.5:9821,10.50.208.6:9821
#zookeeper: localhost:2181
schemaRegistry: http://localhost:8085
ksqldbServer: http://localhost:8088
kafkaConnect:
- name: first
address: http://localhost:8083
jmxPort: 9997
# -
# name: secondLocal
# bootstrapServers: localhost:9093
# zookeeper: localhost:2182
# schemaRegistry: http://localhost:18085
# kafkaConnect:
# - name: first
# address: http://localhost:8083
# jmxPort: 9998
# read-only: true
# -
# name: localUsingProtobufFile
# bootstrapServers: localhost:9092
# protobufFile: messages.proto
# protobufMessageName: GenericMessage
# protobufMessageNameByTopic:
# input-topic: InputMessage
# output-topic: OutputMessage
spring:
security:
user:
name: admin
password: Arms@2022
jmx:
enabled: true
auth:
type: LOGIN_FORM
主要是修改端口和bootstrapServers kafka的集群地址
其余配置含义如下所示:
name: 集群名称
bootstrapServers: 在哪里连接
schemaRegistry: schemaRegistry 的地址
schemaRegistryAuth.username: schemaRegistry 的基本认证用户名
schemaRegistryAuth.password: schemaRegistry 的基本认证密码
schemaNameTemplate:如何将密钥保存到 schemaRegistry
jmxPort: 打开代理的 JMX 端口
readOnly: 启用只读模式
启动
nohup /app/arms/kafka-ui/jdk-14.0.2/bin/java -jar -Dspring.config.location=/app/arms/kafka-ui/application-dev.yml kafka-ui-api-v0.4.0.jar &