mmonit不使用远程服务器IP,而是使用localhost

发布于 2025-02-11 19:31:15 字数 843 浏览 1 评论 0原文

我已经安装了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.

mmonit trying to connect to remote server on localhost:2812 and showing connection refused

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.

mmonit host settings showing localhost as the server address

Is there a way to push the correct external IP address from monit > mmonit in the config file?

Anyone have any insights here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满栀 2025-02-18 19:31:15

在Monit Monitrc文件中使用适当的主机名或iPaddress。

set httpd port 2812 and
  use address 1.2.3.4
  allow localhost
  allow 1.2.3.0/24

MONIT使用的“使用地址”地址应由您的M/MONIT系统连接。并且“允许”地址掩码应包括M/Monit系统和Monit系统,您可以添加多个地址掩码。

Use a proper hostname or ipaddress in the Monit monitrc files.

set httpd port 2812 and
  use address 1.2.3.4
  allow localhost
  allow 1.2.3.0/24

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文