Xymon Mailing List Archive search

XYMON - corrective measures?

list Tom S
Fri, 23 Dec 2011 16:57:25 -0500
Message-Id: <CAE+ojT+hj87buHcSz1JvwMnjuOaiySYgXmP0ZRKfbRQc9=user-74e3b4a1ce10@xymon.invalid>

Thanks.

So this will work?: (example in alerts.cfg)
HOST=www.foo.com SERVICE=http
MAIL user-d0a7de99275f@xymon.invalid DURATION>2 COLOR=red
SCRIPT /usr/local/bin/restartapache.sh

and in restartapache.sh I would have the following:
#/bin/bash
ssh xymon at web1-server 'sudo /etc/init.d/apache2 restart'
exit
(considering xymon is in the sudoers list)

How can I make sure that the 'SCRIPT /usr/local/bin/restartapache.sh' is
only run once per alert in case of network issues (connecting to port 80)
it doesn't keep trying to ssh and restarting the server every few minutes?

TIA


On Fri, Dec 23, 2011 at 3:07 PM, Steven Carr <user-923b20c0d620@xymon.invalid> wrote:
Take a look at the alerts.cfg man page...
http://www.xymon.com/xymon/help/manpages/man5/alerts.cfg.5.html

You can configure an alert to trigger a custom script, that script could
then run off and do whatever you need it to do.

Steve


On 23 December 2011 20:01, Tom S <user-428671d28ab5@xymon.invalid> wrote:
It would be nice to have some way to have XYMON do 'corrective measures'
for an alert.
example: if Apache was  hanging yet the connection to a client system was
OK, to log on with ssh and restart Apache2.

is there a way to implement this easily?

TIA!