monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: monit and m/monit


From: Martin Pala
Subject: Re: monit and m/monit
Date: Tue, 7 Feb 2012 14:13:45 +0100

Hi David,

the "set httpd" statement should be used only once - if there are two instance, 
only one of them will have effect. If you need to have access from both 
localhost and network hosts, just remove the specific bind.

I'd suggest to replace these two statements from your configuration:
--8<--
set httpd port 2812
   use address ec2-yyy-yyy-yyy-yyy.compute-1.amazonaws.com
   allow localhost             # note: this has no effect, as the httpd in this 
case listens only on public interface ('use address ec2…')
   allow xxx.xxx.xxx.xxx
   allow admin:password

set httpd port 2812 and
   use address localhost # only accept connection from localhost
   allow localhost
   allow xxx.xxx.xxx.xxx  # note: this has no effect, as the httpd in this case 
listens only on loopback interface ('use address localhost') => no access from 
public address is possible
   allow monit_admin:monit_password      # require user 'admin' with password 
'monit'
--8<--


with this:
--8<--
set httpd port 2812 and
   allow localhost
   allow xxx.xxx.xxx.xxx
   allow monit_admin:monit_password 
--8<--

=> it allows access from localhost + xxx.xxx.xxx.xxx (and requires correct 
username+password too)

Regards,
Martin


On Feb 5, 2012, at 8:00 AM, David Montgomery wrote:

> Hi,
> 
> Overall I have monit and /monit working together to monitor my ec2
> instances.  m/moint is hosted on a dedicated server.
> 
> I am using monit from sudo apt-get install monit on ubuntu 64.   Not
> built from source.
> 
> In m/monit when I got the the status tab and I click on a host, I get
> this error.
> 
> Cannot connect to Monit -- 404 Not Found
> 
> When I test host configuration and I enter in the monit username and
> password I get CONNTECTION OK!
> 
> On the top of my monitrc file  have the below where xxx.xxx.xxx.xxx is
> the ip address of my dedicated server :
> 
> set eventqueue basedir /var/monit/ slots 1000
> set mmonit http://monit:address@hidden:8080/collector
> set httpd port 2812 and use address 
> ec2-yyy-yyy-yyy-yyy.compute-1.amazonaws.com
>    allow localhost
>    allow xxx.xxx.xxx.xxx
>    allow admin:password
> 
> set httpd port 2812 and
>    use address localhost # only accept connection from localhost
>    allow localhost
>    allow xxx.xxx.xxx.xxx
>    allow monit_admin:monit_password      # require user 'admin' with
> password 'monit'
> 
> So..how to I fix given the above config?
> 
> Thanks
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]