monit-general
[Top][All Lists]
Advanced

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

Re: Host connection test and alert/exec


From: Jan-Henrik Haukeland
Subject: Re: Host connection test and alert/exec
Date: Fri, 17 Oct 2003 20:04:30 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux)

Jan-Henrik Haukeland <address@hidden> writes:

> check host xyzzy with address xyzzy.foo.bar
>       if failed icmp type echo then unmonitor
*

OK, I have refined this so it's much more useful. The idea is that
*if* a icmp ping test is used in a check host entry, this test is run
first. Now, if the ping test should fail we assume that the connection
to the host is down and monit does *not* continue to test any port
connections. This means that you do not need to use unmonitor and
stuff like that, the whole thing is automatic. Here's an example:

 check host xyzzy with address xyzzy.org
       if failed icmp type echo with timeout 5 seconds then alert
       if failed port 80 proto http then alert
       if failed port 443 type TCPSSL then alert
       alert address@hidden

In this case, if the icmp test should fail you will get *one* alert
and only one alert as long as the host is down, and equally important,
monit will *not* test port 80 and port 443. Likewise if the icmp ping
test should succeed (again) monit will continue to test both port 80
and 443. 

I have put up a new monit 4.1 beta2 with this feature and you can read
about the icmp ping test here:

http://www.tildeslash.com/monit/beta/monit.html#remote%20host%20ping%20test

-- 
Jan-Henrik Haukeland




reply via email to

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