kafka集羣管理工具kafka-manager 安裝部署

kafkamanger github地址:https://github.com/yahoo/kafka-manager

官方說明

Kafka Manager

A tool for managing Apache Kafka.

It supports the following :

  • Manage multiple clusters
  • Easy inspection of cluster state (topics, consumers, offsets, brokers, replica distribution, partition distribution)
  • Run preferred replica election
  • Generate partition assignments with option to select brokers to use
  • Run reassignment of partition (based on generated assignments)
  • Create a topic with optional topic configs (0.8.1.1 has different configs than 0.8.2+)
  • Delete topic (only supported on 0.8.2+ and remember set delete.topic.enable=true in broker config)
  • Topic list now indicates topics marked for deletion (only supported on 0.8.2+)
  • Batch generate partition assignments for multiple topics with option to select brokers to use
  • Batch run reassignment of partition for multiple topics
  • Add partitions to existing topic
  • Update config for existing topic
  • Optionally enable JMX polling for broker level and topic level metrics.
  • Optionally filter out consumers that do not have ids/ owners/ & offsets/ directories in zookeeper.

Cluster Management

使用kafka-manger

1.源碼下載構建(kafka-manager基於sbt 管理工具進行構建 so 需要sbt 環境)

2.下載release版本進行構建 

3.zip直通車下載進行解壓 即可使用(推薦 百度網盤 (提供兩個不同版本 一個1.3 一個2.0 按需要使用)鏈接:https://pan.baidu.com/s/14PA1-V7fMUBTr-3-HeUi7A  密碼:vsx7)

構建完成後 可以直接在如下位置找到  kafka-manager-2.0.0.2下載位置/target/universal/kafka-manager-2.0.0.2.zip

進行解壓

解壓後可以看到如下文件夾

進行啓動修改 conf 下配置在

在application.conf 進行修改 zk地址 單個就配置單個 集羣配置如下

kafka-manager.zkhosts="localhost:2181,localhost:2182,localhost:2183"

# kafka-manager.zkhosts=${?ZK_HOSTS} 將這個進行註釋

 

修改完成後進行啓動

啓動方式

1.直接進行啓動 默認端口9000 會自動去默認路徑查找配置文件

 

$ ./bin/kafka-manager

 2.指定配置文件 端口記性啓動 

$ ./bin/kafka-manager -Dconfig.file=/path/to/application.conf -Dhttp.port=8080

我們這裏進行簡單暴力的啓動 ./bin/kafka-manager

啓動成功會看到如下日誌

瀏覽器輸入 localhost:9000 

部署成功

 #20191218 新增 查看本地的集羣節點

 

進入到如下界面

 

填入集羣名稱 還有zk地址 以及 需要jmx認證的話 配置 賬號密碼 

其他的配置可以按需調整

然後選擇保存(save)

可以查看到到本地的集羣的 

 

點擊localhost 查看本地的集羣

 

點擊brokers 後面的3  可以查看每個集羣  

 

點擊topic右邊的 可以查看 集羣內的topic

 

再點擊每個topic 可以查看topic

 

同時也可以創建topic

功能就簡單介紹到這裏  其他功能供各位探索

參考 kafka-manager https://github.com/yahoo/kafka-manager

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章