Search code examples
monit

Why Monit is not running in local host?


I m trying to run monit in my ubuntu system . I followed the complete steps the was giving in link . ie (https://www.tecmint.com/how-to-install-and-setup-monit-linux-process-and-services-monitoring-program/) every thing is fine i m not getting any error but still when i try to load it on browser (This site can’t be reached localhost refused to connect) is showing on browser i m not getting any solution.

[un-commented code][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

Solution

  • It appears you edited out 127.0.0.1 and replaced it with 10.0.4.115 in two places. Read the comments next to the first 3 lines you posted above.

    I recommend you remove the 'use address' line and make multiple allow lines.

    set httpd port 2812
      allow localhost
      allow 10.0.3.115