monit-dev
[Top][All Lists]
Advanced

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

Re: statement changes suggestions [READ Please]


From: Jan-Henrik Haukeland
Subject: Re: statement changes suggestions [READ Please]
Date: Wed, 06 Aug 2003 02:47:15 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Martin Pala <address@hidden> writes:

> I forgot to discuss new vs. present behavior.

Okay, many good suggestions, which I agree with but but I'm not sure I
have the energy to change the checksum statement and I guess that you
don't have the time or energy either. Give me a few days to chew on
it, that is unless others step up and implements it?

Anyway, looking through your examples I thought that this example was
super cool, I mean, the way you use depend here is inventive and
something I would not have tought about. This is very clever and a
nice way to separate file tests from the depending service but still
make an event (restart/stop) propagate upwards and stop the depending
service.

> check process foo with pidfile /var/run/foo.pid
>   start program = "/etc/init.d/foo start"
>   stop program = "/etc/init.d/foo stop"
>   depends foo_bin
>
> check file foo_bin with path /usr/bin/foo_bin
   if timestamp /usr/bin/foo_bin was changed then stop

Unfortunately this example will not work because the current code
requires that a stop/start program is defined for the "check file" as
well. But no worries I have changed the code now to make this example
work. (The trick is to *not* check for start/stop programs unless the
service is a PROCESS service). Besides having a start/stop program for
a file/directory/device is kind of strange :-) and it's not necesarry
now is it? I mean since we have introduced the exec statement.

Anyway, this way to use check and depend for file/directories together
with a process service should be mentioned in the documentation,
because it is ELEGANT, and a powerfull combination.

-- 
Jan-Henrik Haukeland




reply via email to

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