kafka管理工具

打印 上一主题 下一主题

主题 862|帖子 862|积分 2586

前言

提示:这里可以添加本文要记录的大概内容:
一个好的界面管理工具可以使得开发效率更为高效,因kafka本身没有自研的管理工具!于是尝试安装市面上的一些辅助工具。


  • Kafka Assistan
  • Conduktor
  • kafka-maneger(已更名cmak)

一、Kafka Assistan

1.1 描述

Kafka Assistan——是一款对服务器状态监控的可视化图形工具,界面比较友好


  • window可用,linux安装失败
  • localhost可用,非本机利用需付费购买
  • 参考文档较少
192.168.10.101:9092
1.2、设置安装

地点阐明http://www.redisant.cn/ka 界面如下:

二、Conduktor

2.1、描述

Conduktor是一款商业化的Apache Kafka Connector,可以利用该工具毗连Kafka Cluster


  • 需注册账户
  • window可装,linux安装需授权(付费)
  • 免费版仅支持一个地点接入,且功能较少
  • 参考文档较少
2.2、设置安装

地点阐明https://conduktor.io/download?spm=a2c6h.12873639.article-detail.7.39085cc0ygCD4y 界面如下:



三、kafka-maneger

3.1、描述

利用人群最多,因为功能不受限且免费!!!


  • 需要启动zookeeper服务
  • 极大概率java版本不兼容,需升级java版本(文内会附带教程)
3.2、设置安装

地点阐明https://https://github.com/yahoo/CMAK/releases利用已编译的格式为cmak-x.0.0.0.zip
  1. wget https://github.com/yahoo/CMAK/releases/download/3.0.0.6/cmak-3.0.0.6.zip
  2. unzip cmak-3.0.0.6.zip -d /opt/module/
  3. cd /opt/module/
  4. ln -s cmak-3.0.0.3/ KafkaGUI
  5. vim /opt/module/KafkaGUI/conf/application.conf  # 编辑配置文件
复制代码
新增参数,kafka-manager.zkhosts;cmak.zkhosts
  1. # Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
  2. # See accompanying LICENSE file.
  3. # This is the main configuration file for the application.
  4. # ~~~~~
  5. # Secret key
  6. # ~~~~~
  7. # The secret key is used to secure cryptographics functions.
  8. # If you deploy your application to several instances be sure to use the same key!
  9. play.crypto.secret="^<csmm5Fx4d=r2HEX8pelM3iBkFVv?k[mc;IZE<_Qoq8EkX_/7@Zt6dP05Pzea3U"
  10. play.crypto.secret=${?APPLICATION_SECRET}
  11. play.http.session.maxAge="1h"
  12. # The application languages
  13. # ~~~~~
  14. play.i18n.langs=["en"]
  15. play.http.requestHandler = "play.http.DefaultHttpRequestHandler"
  16. play.http.context = "/"
  17. play.application.loader=loader.KafkaManagerLoader
  18. # Settings prefixed with 'kafka-manager.' will be deprecated, use 'cmak.' instead.
  19. # https://github.com/yahoo/CMAK/issues/713
  20. kafka-manager.zkhosts="kafka-manager-zookeeper:2181"
  21. kafka-manager.zkhosts=${?ZK_HOSTS}
  22. cmak.zkhosts="kafka-manager-zookeeper:2181"
  23. cmak.zkhosts=${?ZK_HOSTS}
  24. kafka-manager.zkhosts="127.0.0.1:2181"  # 浏览器访问服务地址,依据实际(127.0.0.1|192.168.10.101)填写为准
  25. cmak.zkhosts="127.0.0.1:2181"
  26. pinned-dispatcher.type="PinnedDispatcher"
  27. pinned-dispatcher.executor="thread-pool-executor"
  28. application.features=["KMClusterManagerFeature","KMTopicManagerFeature","KMPreferredReplicaElectionFeature","KMReassignPartitionsFeature", "KMScheduleLeaderElectionFeature"]
  29. akka {
  30.   loggers = ["akka.event.slf4j.Slf4jLogger"]
  31.   loglevel = "INFO"
  32. }
  33. akka.logger-startup-timeout = 60s
  34. basicAuthentication.enabled=false
  35. basicAuthentication.enabled=${?KAFKA_MANAGER_AUTH_ENABLED}
  36. basicAuthentication.ldap.enabled=false
  37. basicAuthentication.ldap.enabled=${?KAFKA_MANAGER_LDAP_ENABLED}
  38. basicAuthentication.ldap.server=""
  39. basicAuthentication.ldap.server=${?KAFKA_MANAGER_LDAP_SERVER}
  40. basicAuthentication.ldap.port=389
  41. basicAuthentication.ldap.port=${?KAFKA_MANAGER_LDAP_PORT}
  42. basicAuthentication.ldap.username=""
  43. basicAuthentication.ldap.username=${?KAFKA_MANAGER_LDAP_USERNAME}
  44. basicAuthentication.ldap.password=""
  45. basicAuthentication.ldap.password=${?KAFKA_MANAGER_LDAP_PASSWORD}
  46. basicAuthentication.ldap.search-base-dn=""
  47. basicAuthentication.ldap.search-base-dn=${?KAFKA_MANAGER_LDAP_SEARCH_BASE_DN}
  48. basicAuthentication.ldap.search-filter="(uid=$capturedLogin$)"
  49. basicAuthentication.ldap.search-filter=${?KAFKA_MANAGER_LDAP_SEARCH_FILTER}
  50. basicAuthentication.ldap.group-filter=""
  51. basicAuthentication.ldap.group-filter=${?KAFKA_MANAGER_LDAP_GROUP_FILTER}
  52. basicAuthentication.ldap.connection-pool-size=10
  53. basicAuthentication.ldap.connection-pool-size=${?KAFKA_MANAGER_LDAP_CONNECTION_POOL_SIZE}
  54. basicAuthentication.ldap.ssl=false
  55. basicAuthentication.ldap.ssl=${?KAFKA_MANAGER_LDAP_SSL}
  56. basicAuthentication.username="admin"
  57. basicAuthentication.username=${?KAFKA_MANAGER_USERNAME}
  58. basicAuthentication.password="password"
  59. basicAuthentication.password=${?KAFKA_MANAGER_PASSWORD}
  60. basicAuthentication.realm="Kafka-Manager"
  61. basicAuthentication.excluded=["/api/health"] # ping the health of your instance without authentification
  62. kafka-manager.consumer.properties.file=${?CONSUMER_PROPERTIES_FILE}
复制代码
3.3、下令启动

  1. cd /opt/module/KafkaGUI/bin
  2. ./cmak
  3. 浏览器访问:http://127.0.0.1:9000
复制代码




3.4、JAVA升级

  1. 更新软件包列表,检查可用的软件包更新
  2. sudo apt update
  3. 更新已安装的软件包至最新版
  4. sudo apt upgrade
  5. sudo apt install openjdk-8-jdk
  6. java -version
  7. # 检索java安装位置,如果有多个版本,会有多个版本文件。格式如java-x.yy.0-openjdk-amd64
  8. ls /usr/lib/jvm/
  9. 配置环境变量,将java路径指向高版本java文件,见->
  10. nano ~/.bashrc
  11. ->
  12. export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  13. export PATH=$PATH:$JAVA_HOME/bin
  14. # 使环境变量生效
  15. source ~/.bashrc
复制代码
3.5、refer to



免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

用户国营

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表