如何列出集群中所有可用的Kafka经纪人?

编程入门 行业动态 更新时间:2024-10-25 04:25:40
本文介绍了如何列出集群中所有可用的Kafka经纪人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在编写一个shell脚本来监视kafka经纪人.

I am writing a shell script to monitor kafka brokers.

我浏览了一些链接,发现如果ZooKeeper包含代理列表,并且在此列表中存在IP地址,则说明kafka代理正在运行.

I have gone through some links and found that if ZooKeeper contains a list of brokers, and if, in this list, the IP address is present, then a kafka broker is running.

我想要一个可以在我的shell脚本中使用的命令来获取代理列表并检查kafka是否正在运行.

I want a command that I can use in my shell script to get the broker list and check whether kafka is running.

是否存在任何 curl 命令来获取kafka集群状态(例如elasticsearch)?

Is there any curl command to get the kafka cluster status like elasticsearch?

推荐答案

此命令将为您提供括号之间的活动代理列表:

This command will give you the list of the active brokers between brackets:

./bin/zookeeper-shell.sh localhost:2181 ls /brokers/ids

更多推荐

如何列出集群中所有可用的Kafka经纪人?

本文发布于:2023-10-19 18:04:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508335.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:集群   经纪人   Kafka

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!