monit-general
[Top][All Lists]
Advanced

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

Proposal: change connection tests statement


From: Jan-Henrik Haukeland
Subject: Proposal: change connection tests statement
Date: Mon, 13 Dec 2004 03:44:42 +0100

1) 

In the current monit version it is possible to write a connection test
in a process entry as shown below:

 check process xinetd with pidfile /var/run/xinetd.pid
       start program = "...."
       stop program = "..."
       alert address@hidden
-->    if failed port 631 then alert

I suggest that this is removed in the next release and that a connection
test is only allowed in a check-host entry. As the example below
illustrate the depend statement can be used to express the same thing.
There are 3 reasons I want to remove connection tests from a process
entry, a) Logically it does not belong in the process entry b) it's
easier in the documentation to explain connection test if it's in one
place c) the code will be better. 

Unless I get a veto vote on this I'm going to change the code when I get
time. Yes, it will break backward compatibility but it will also make
the control file language cleaner. We could deprecate connection tests
in a check process entry and allow it in a few new versions of monit or
invalidate now and print an error? Personally I would like to invalidate
it now with an explanatory error message.

2) 

In addition I also propose that we change the connection statement and
remove host name from it. Since we have a check-host statement it is
redundant and it sort of breaks the logic of a check host entry in that
you can specify another host than the one checked. I.e. this is legal

 check host redhat with address www.redhat.com
    if failed host debian.org port 80 ...
    if failed port 80 ....

In other words I suggest that it's not possible to specify the host in
the if-test and that the above is illegal. This means that if you want
to test another host you must create a new check host entry.

Viewpoints anyone?


######

Example on associate a connection test to a process:

check process apache with pidfile /var/run/httpd.pid
       start program = "...."
       stop program = "..."
       alert address@hidden
       depends on localhost.apache

check host localhost.apache with address localhost
      if failed port 80 with 
         protocol apache-status loglimit > 60% 
      then restart





reply via email to

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