mmonit不使用远程服务器IP,而是使用localhost
我已经安装了Monitit,其中包含各种服务器。监视正在起作用,但试图重新启动任何服务器会导致它试图联系自身(在Localhost)而不是Origin Server IP。
通过自动化,我在EC2上遇到了类似的问题,而内部IP的分配而不是公共IP。因此,我们遇到了相同的错误,但它显示了AWS内部EC2 IP。
我们的mmonit文件非常简单,并且没有提及Localhost:
set httpd port 2812
allow xxx.xxx.xxx.xxx
allow monitcli:xxxxxxxxxxxxxxxx
在Monit主机设置中,它显示Localhost或EC2内部IP,并且当然,我可以手动覆盖这一点,但这是皮塔饼。
有没有办法从Monit&Gt推动正确的外部IP地址;配置文件中的mmonit?
有人在这里有任何见解吗?
I've got an install of mmonit with various servers reporting into it. The monitoring is working, but trying to restart any servers results in it trying to contact itself (on localhost) and not the origin server IP.
I face a similar issue on ec2 via autoscaling, where the internal IP is assigned, not the public IP. Thus we get the same error, but it shows the AWS internal ec2 IP.
Our mmonit file is super simple, and doesn't mention localhost:
set httpd port 2812
allow xxx.xxx.xxx.xxx
allow monitcli:xxxxxxxxxxxxxxxx
In the monit host settings, it shows localhost, or the ec2 internal IP, and sure, I can manually override this, but that's a PITA.
Is there a way to push the correct external IP address from monit > mmonit in the config file?
Anyone have any insights here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在Monit Monitrc文件中使用适当的主机名或iPaddress。
MONIT使用的“使用地址”地址应由您的M/MONIT系统连接。并且“允许”地址掩码应包括M/Monit系统和Monit系统,您可以添加多个地址掩码。
Use a proper hostname or ipaddress in the Monit monitrc files.
The "use address" address used by Monit should be reachable by your M/Monit system. And the "allow" address mask should include the M/Monit system and the Monit system, you can add multiple address masks.