[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
monit alert definition / action support [was: monit and xmpp notificatio
monit alert definition / action support [was: monit and xmpp notifications]
Wed, 01 Dec 2004 21:08:21 +0100
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
Jan-Henrik Haukeland wrote:
Nevertheless, maybe globally alerter1="", alerter2="", etc. could be
to exec), which will all be run whenever monit wants to sends an alert,
and some interesting arguments in env vars.
Right! Lets see what the others think about it first. Feedback anyone?
I though about something similar, but maybe more general.
The idea is based on methods definition. Monit can have some
"well-known" methods, such as start, stop, restart, alert, etc. It could
be possible to add another methods or redefine the default behavior.
More then one action could be supported by comma separating their
1 set method alert-xmpp "/usr/bin/sendxmpp -s $MONIT_EVENT address@hidden"
3 check process myproc with pidfile /var/run/myproc.pid
4 if <condition1> then alert, alert-xmpp, restart
5 if <condition2> then stop, alert
1 defines global method, its name (alert-xmpp is possible to use as
4 defines stack of actions - i.e. "alert" && "alert-xmpp" && "restart"
5 defines diferrent actions for diferrent condition
The method could be set globaly (token accessible in all check
statements), or localy (accessible only in the check statement where the
method was defined).
It could be possible to override default behavior, of well-known method
by local or global explicit definition (using the same name - for
Just my 0.02$ :)