Search code examples
monit

How can I access monit http remotely


I have been trying for hours to configure monit so I can access it remotely from a web browser from http://:2812 but it always times out. I have Nexus running on the same instance at http::8081 so I know basic connectivity works: My monitrc contains

set httpd port 2812
#     use address localhost  # only accept connection from localhost
     allow localhost        # allow localhost to connect to the server and
     allow admin:monit      # require user 'admin' with password 'monit'
     allow 50.67.165.130    # remote host

Where remote host is where I am trying to connect from. Is there some other special magic to be able to access the monit httpd remotely?

Strange that this has to be so hard.


Solution

  • I have been through the same problem, I dont think the configuration likes comments right below the "set", try to put the lines without comments right below the "set". For example:

     set httpd port 2812
            allow admin:monit
    

    Do also watch the log for errors:

    tail -f /var/log/monit.log