使用ZooNavigator可视化Zookeeper

使用命令行操作 ZooKeeper 比较麻烦,所以很有必要使用可视化工具

zoonavigator-web是用TypeScript 编写的可视化 Web 客户端,是个可以直接运行的 Web 服务

github地址: https://github.com/elkozmon/zoonavigator-web

ZooNavigator安装

在运行docker run命令之前,先将上一节的docker-compose停掉——在目录下执行docker-compose stop

参考: https://github.com/elkozmon/zoonavigator ,使用docker运行:

docker run \
  -d \
  -p 8080:9000 \
  -e HTTP_PORT=9000 \
  --name zoonavigator \
  --restart unless-stopped \
  elkozmon/zoonavigator:latest

image-20211223234824960

预览ZooNavigator的UI:

image-20211223234801718

connection string可以从MSK的页面获取, 或者使用命令行获取:

# aws kafka describe-cluster --cluster-arn <cluster-arn> --query 'ClusterInfo.ZookeeperConnectString'

kongpingfan:~/environment $ aws kafka describe-cluster --cluster-arn arn:aws:kafka:ap-southeast-1:145197526627:cluster/MSKDemo/89d04308-2643-4e80-b6e2-fe996354f056-4 --query 'ClusterInfo.ZookeeperConnectString'                                                                                                          
"z-2.mskdemo.mxqzz7.c4.kafka.ap-southeast-1.amazonaws.com:2181,z-3.mskdemo.mxqzz7.c4.kafka.ap-southeast-1.amazonaws.com:2181,z-1.mskdemo.mxqzz7.c4.kafka.ap-southeast-1.amazonaws.com:2181"

image-20211223234912023

ZooNavigator界面

image-20211223235105183

image-20211223235123074