monit-dev
[Top][All Lists]
Advanced

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

statement changes suggestions


From: Jan-Henrik Haukeland
Subject: statement changes suggestions
Date: Sat, 02 Aug 2003 00:49:58 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Today the connection test checks a port (and possibly the protocol at
the port) and if an error occurs, monit restarts the server.

This may not always be the behavior you want. Instead of blindly
restarting the service the user should have the possibility to choose
between different actions; alert, restart, stop and exec. In other
words the connect test should be more similar to the timestamp and
resource statement.

This include rewriting the statement to look more like an if-test.
Here's a proposal, consider the following port statement:

 host www.sol.no port 80 protocol http

It should/could be rewritten to:

 IF FAILED host www.sol.no port 80 protocol http 
 THEN [ALERT | STOP | RESTART | EXEC]

Likewise the checksum statement could also be rewritten to become a
more general purpose statement as follows:

 IF FAILED checksum /usr/bin/httpd and 
   expect the sum 4e5309d1956f003bcdff168748bea647
 THEN [ALERT | STOP | RESTART | EXEC]

What do you think?

-- 
Jan-Henrik Haukeland




reply via email to

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