[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exec implemented!
From: |
Martin Pala |
Subject: |
Re: Exec implemented! |
Date: |
Tue, 22 Jul 2003 23:00:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 |
Christian Hopp wrote:
On Sun, 20 Jul 2003, Jan-Henrik Haukeland wrote:
Moin!
(...)
3) I have also added an extra feature to the parser. Now every program
mentioned in a start/stop/exec statement is checked in the parser
if they actually exist.
(...)
What if the program is deleted while monit runtime? Should monit
test, just before running it. If failed, send a message?
I agree. Existence test is implemented already in check_file()
(validate.c) => currently the most clean configuration could be:
---
check process ....
start "/path/to/startfile ..."
depends on startfile
check file startfile ...
checksum ...
---
Control language clean-up is possible, e.g. allow all "file" related
tests (like 'checksum', 'timestamp', etc.) in just "file" service type.
These test then could be simplified - the 'path' part could be removed,
because the path will be specified in 'file service' definition. For
example replace :
checksum /usr/local/apache/bin/httpd and expect the sum
8f7f419955cefa0b33a2ba316cba3659
with
checksum and expect the sum 8f7f419955cefa0b33a2ba316cba3659
More complex example:
---
check process apache with path /usr/local/apache/logs/httpd.pid
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
depends on apache_rc
depends on apache_binary
depends on apache_conf
...
check file apache_rc with path /etc/init.d/httpd
checksum and expect the sum 1a6d429254cafa8b34c2bb317cba2118
if timestamp changed the alert
perm 755 # just example
check file apache_binary with path /usr/local/apache/bin/httpd
checksum and expect the sum 8f7f419955cefa0b33a2ba316cba3659
if timestamp changed the alert
perm 755 # just example
check file apache_conf with path /etc/httpd/conf/httpd.conf
if timestamp changed the reload
size < 10 MB
perm 755 # just example
---
If any of these files is removed, action is taken by monit.
Though such configuration is clean, logical and object oriented, i think
it is probably usefull to have present shortcut and allow to define file
related test in other service types as well.
What do you think? Shall we restrict the language in this sense?
Ps. I have been thinking and rethinking about the monit 4.0 release --
I think that implementing Martin's language proposal could take some
time and we have done lot's of changes and bugfixes to the current
codebase. What do you think about freezing what we have now and do an
intermediate 3.3 release in a short while and take the language
changes in a 4.0 release later this year?
What feature would be still pending for 3.3?
+1
I'm +1 for freezing and release, but i think the major version number
should be probably upgraded (mark it as 4.0), because of big changes in
model and codebase (events), move from process oriented monitoring to
more general monitoring (devices, files, directories), etc. Anyway
extensive testing is needed before release, but because of changes this
release can behave very different from previous releases and there can
be hidden bugs (and version 3.3 seems less dangerous than 4.0). I
generally prefer slow versioning, but n this case i'm -1 to mark it as 3.3.
I would feel a little more confident taking on the language changes
if we could freeze and stabilize the current code base with a
release and make sure that it works properly first. What do you
think?
+1
My +1 too :)
Martin