首页 > 解决方案 > 为什么 moint 不在本地主机上运行?

问题描述

我正在尝试在我的 ubuntu 系统中运行 monit 。我按照链接中给出的完整步骤进行操作。即(https://www.tecmint.com/how-to-install-and-setup-monit-linux-process-and-services-monitoring-program/)一切都很好,我没有收到任何错误,但当我仍然尝试在浏览器上加载它(无法访问此站点 localhost 拒绝连接)在浏览器上显示我没有得到任何解决方案。

[未注释代码][1]

set httpd port 2812 and
     use address 10.0.4.115  # only accept connection from localhost
     allow 10.0.4.115        # allow localhost to connect to the server and
     allow admin:monit      # require user 'admin' with password 'monit'
     allow @monit
     allow @users readonly




kundan@CHEALPHADT005:~$ sudo monit status
Monit 5.25.1 uptime: 2h 35m

System 'CHEALPHADT005'
  status                       OK
  monitoring status            Monitored
  monitoring mode              active
  on reboot                    start
  load average                 [0.43] [0.45] [0.22]
  cpu                          0.7%us 0.4%sy 0.5%wa
  memory usage                 2.3 GB [29.6%]
  swap usage                   0 B [0.0%]
  uptime                       2h 35m
  boot time                    Fri, 15 Feb 2019 12:21:56
  data collected               Fri, 15 Feb 2019 14:57:15

标签: monit

解决方案


看来您编辑了 127.0.0.1 并在两个地方用 10.0.4.115 替换它。阅读您在上面发布的前 3 行旁边的评论。

我建议您删除“使用地址”行并制作多个允许行。

set httpd port 2812
  allow localhost
  allow 10.0.3.115

推荐阅读