Menu

#76 take action on status

open
nobody
None
5
2004-04-02
2004-04-02
No

see Message-Id: <1079705637.27835.371.camel@susix>
on the mailing list for reference. I would like to see an
option where I can specify a specific action being taken
based on status.

localhost proc=process min=1 max=4
action=min:/command/to/run
action=max:/command/to/run
procs

This is a bit different from the one you used as an
example:
localhost proc=sshd action=red:restart(ssh) procs

The reason is that if you use min/max syntax for
monitoring an action taken based on the red status may
be ok for min but not for max. Typical example: If a
process doesn't exist (min=1) I possibly want to start it,
if there are too many processes I may want to REstart it
or STOP it and pause a minute and then start it or
simply not restart at all, but just know about it. So,
actions for min and max may differ. This could be used
as an exclusive alternative, so either use a color status
action or a min/max action, not both at the same time.
As for the restart(ssh) part I think it's better to just use
a command line here where the user can put any
command he wants. That way he can use his own script
to handle the event.
Thanks for considering!

Discussion


Log in to post a comment.