Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] <Question about zookeeper monitoring> #947

Closed
sppan24 opened this issue May 11, 2023 · 6 comments · Fixed by #957
Closed

[Question] <Question about zookeeper monitoring> #947

sppan24 opened this issue May 11, 2023 · 6 comments · Fixed by #957
Labels
question Further information is requested

Comments

@sppan24
Copy link

sppan24 commented May 11, 2023

Question

存在的疑问:

  1. zk的监控是基于nc命令来实现的,那为什么还会需要基于ssh协议?
  2. 现在的内置zk监控模板app-zookeeper.yml,在基于ssh协议的基础上,执行的诸如echo mntr | nc 121.40.113.44 2181命令,是不正确的,如果需要监控多台zk,每个都需要改对应的ip地址,也就是说需要重新自定义监控来实现。为何不直接通过变量的形式控制即可?

我的个人考虑,是否应该直接支持nc协议,不需要over ssh会更合理一些?

@sppan24 sppan24 added the question Further information is requested label May 11, 2023
@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Question

Existing doubts:

  1. The monitoring of zk is implemented based on the nc command, so why is it still based on the ssh protocol?
  2. The current built-in zk monitoring template app-zookeeper.yml, based on the ssh protocol, executes commands such as echo mntr | nc 121.40.113.44 2181, which is incorrect. If necessary To monitor multiple zk, each needs to change the corresponding ip address, that is to say, it needs to re-customize the monitoring to achieve. Why not directly control it in the form of variables?

In my personal consideration, should the nc protocol be directly supported, and it would be more reasonable not to require over ssh?

@hertzbeat hertzbeat changed the title [Question] <关于zookeeper监控的疑问> [Question] <Question about zookeeper monitoring> May 11, 2023
@tomsun28
Copy link
Contributor

hi 谢谢反馈 看你的分析我觉得是的👍 欢迎贡献一波直接基于 nc 来监控zookeeper 或者看 zookeeper 有没有其他类似对外接口我们可以采集数据监控

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hi, thank you for your feedback. I think it is based on your analysis 👍 Welcome to contribute a wave of monitoring zookeeper directly based on nc or see if zookeeper has other similar external interfaces that we can collect data monitoring

@sppan24
Copy link
Author

sppan24 commented May 15, 2023

经过我的分析实验,zookeeper的监控完全可以基于telnet来实现和nc命令相同的效果。为了不增加系统复杂性,我扩展了项目里面的telnet协议,可以支持在telnet到指定端口后发送命令并解析响应结果。在这个基础上,可以实现zookeeper的监控,同时不需要ssh到对应的服务器上。具体实现我已经提交了PR,见 #957

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After my analysis and experiments, the monitoring of zookeeper can be based on telnet to achieve the same effect as the nc command. In order not to increase the complexity of the system, I extended the telnet protocol in the project, which can support sending commands and parsing the response results after telnet reaches the specified port. On this basis, zookeeper monitoring can be realized without ssh to the corresponding server. I have submitted PR for specific implementation, see #957

@tomsun28
Copy link
Contributor

经过我的分析实验,zookeeper的监控完全可以基于telnet来实现和nc命令相同的效果。为了不增加系统复杂性,我扩展了项目里面的telnet协议,可以支持在telnet到指定端口后发送命令并解析响应结果。在这个基础上,可以实现zookeeper的监控,同时不需要ssh到对应的服务器上。具体实现我已经提交了PR,见 #957

太强了 👍

@apache apache deleted a comment from hertzbeat May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants