monit-dev
[Top][All Lists]
Advanced

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

Re: monit ./control.c ./event.c ./event.h ./l.l ./m...


From: Jan-Henrik Haukeland
Subject: Re: monit ./control.c ./event.c ./event.h ./l.l ./m...
Date: Wed, 27 Aug 2003 22:09:02 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Martin Pala <address@hidden> writes:

> Log message:
>       Basic support for monitor and unmonitor action added.

Works fine from web and from the command-line, BUT IT DOES NOT WORK in
a standard situation. That is; if I change a file, monit does not
unmonitor the service if I have this in monitrc:

  check file xyzzy with path /home/hauk/xyzzy
   if failed checksum then unmonitor
   alert address@hidden

The reason of course is that it is a checksum event which is thrown.
And the checksum event handler does not do (un)monitoring, nor should
it. Also there is no event handlers for (un)monitor in event.c. I'm
not sure if should be such handlers either, because it *is* a checksum
event, but how do you send the unmonitor action? This may be a bit
tricky to solve, and maybe you can see now why I complained about
eval_action in validate.c because this is not a very good dispatcher
for events.

>       - fix checksum, gid, uid, permission tests to not timeout after error
>       occurence (this way it will behave more consistent - immediate timeout
>       can be caused by unmonitor action, for other cases modified timeout
>       statement should fit)

I'm not sure you should change the timeout statement. As I said
before, it is for process (re)starts and other events are not very
interesting in this context. For instance:

 if 1 checksum event within 1 cycle then timeout

Is uninteresting, because, either you want checksum to unmonitor once
or you want checksum to report always. Likewise with other events
except (re)starts. 

-- 
Jan-Henrik Haukeland




reply via email to

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