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

建议自动获取本机IP,批量更新config.josn及其他建议 #20

Closed
cell13 opened this issue Sep 20, 2017 · 5 comments
Closed

建议自动获取本机IP,批量更新config.josn及其他建议 #20

cell13 opened this issue Sep 20, 2017 · 5 comments

Comments

@cell13
Copy link

cell13 commented Sep 20, 2017

1、reverse ping
默认本机IP是127.0.0.1,Agent Name是localhost.localdomain,如果有大量机器需要部署实现反向ping,就需要一台台修改 IP为机器IP,这样部署起来不是很方便。
2、config.josn配置文件更新
如果有新机器添加到机器列表,如果想要实现其他机器对这个新加机器的互ping,其他机器的配置也需要进行修改,如果是一台台去修改,非常耗费时间。
3、配置加载不能热加载
手动替换配置文件之后不支持热加载,必须要重启配置可以生效。
4、windows启动命令不能后台运行
在windows命令窗口启动之后,如果关闭窗口,程序便会停止,希望支持后台运行。这个是比较容易实现的。

@toryzen
Copy link
Member

toryzen commented Sep 20, 2017

1AgentIPip是没有获取固定127.0.0.1,主要是这边有一些多IP机器不好判断选用哪个,AgentName取得是机器名称,不是固定的
2我考虑下搞个共享配置
3这个配置预加载感觉意义不大,还是用dashbord界面修改就行了,smartping也有修改配置的接口(文档还没写上)
4很快就实现了

@avyou
Copy link

avyou commented Sep 21, 2017

同意 cell3 的将 agent Name, agent ip 写到配置文件,不然批量部署重复工作太多了,
如果写到 config.json这样,我每台机器都是同样配置,省了不少麻烦。

@avyou
Copy link

avyou commented Sep 21, 2017

可以通过判断用户在 aggen list (targets)中的输入IP与本机所有IP对比,决定选用哪个agen ip

@avyou
Copy link

avyou commented Sep 21, 2017

原来这个文件里已经支持可以手工写了,这样可以做成一个模板批量更新了
config-base.json { "Port": xxxx , "Name": "localhost", "Ip": "xxx.xxx.xxxx.xxx", "Password": "955gLaGQIb18", "Alerthistory": 7, "Alertcycle": 1, "Alertsound": "/alert.mp3", ....

@toryzen
Copy link
Member

toryzen commented Sep 21, 2017

可以直接编辑配置文件的,默认程序启动的时候加载conf/config.json,如果不存在则加载conf/config-base.json,只要按照规则配置config.json文件即可

@toryzen toryzen closed this as completed Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants