[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test
From: |
Jan-Henrik Haukeland |
Subject: |
Re: test |
Date: |
Fri, 29 Aug 2003 23:01:31 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) |
Martin Pala <address@hidden> writes:
> Jan-Henrik Haukeland wrote:
> *
>>What do others think? Is it interesting to add an external standalone
>>connection test to monit?
>>
> I agree, it is very interesting.
Let's add it then :-) Because by doing this simple thing (for us) it
opens up a whole new ballpark for monit.
Before we start we must agree on the syntax for the new statement
though. Your proposal:
check host up2date-http with address 66.187.232.110
if failed host rhn.redhat.com port 80 protocol http then {...}
if failed host rhn.redhat.com port 443 type tcpssl protocol http
and request "/my/index.html" then {..}
alert address@hidden
Is good because it lets us keep the current if-connection-test as it
is and can use several connection tests in an entry. But the syntax is
a bit redundant, since the hostname/address is given twice. It is easy
to write a new rule in the parser for a remote connection test, so we
do not *need* to keep the connection test as it is for a remote test.
Here is another suggestion, modeled after your check-file test, where
the host and port is given in the check line and the if-test simply
refere to the host and port:
check host rhn.redhat.com port 80
if failed protocol http and request
"/my/index.html" and with timeout 15 seconds then {...}
alert address@hidden
The drawback with this solution is that since the host and port is
stated in the check-line there can only be *one* if-failed.. test. So
if you want to test more than one port at the server you must write
several check-host statements.
Finally, here is a suggestion using a rewrite of your proposal. Here
the check-block simply contains a descriptive name for the connection
test. [In the parser we will also require that host is stated for a
remote connection test (in the current grammar host is not required
and if not stated is assumed to be localhost).]
check connection redhat <- redhat is just a descriptive name for the test
if failed host rhn.redhat.com port 80 protocol http and request
"/my/index.html" then alert
if failed host rhn.redhat.com port 443 type tcpssl protocol http
and request "/my/index.html" then alert
alert address@hidden
Other suggestions are welcome!
--
Jan-Henrik Haukeland
- test, Igor Homyakov, 2003/08/29
- Re: test, Jan-Henrik Haukeland, 2003/08/29
- Re: test, Martin Pala, 2003/08/29
- Re: test, Martin Pala, 2003/08/29
- Re: test,
Jan-Henrik Haukeland <=
- Re: test, Jan-Henrik Haukeland, 2003/08/29
- Re: test, Martin Pala, 2003/08/29
- Re: test, Martin Pala, 2003/08/29
- Re: test, Jan-Henrik Haukeland, 2003/08/29
- Re: test, Martin Pala, 2003/08/30
- Re: test, Richard Houston, 2003/08/29
- Re: test, Richard Houston, 2003/08/29
- Re: test, Martin Pala, 2003/08/29