[Xymon] XYMON - corrective measures?

Tom S tsztur at gmail.com
Fri Dec 23 22:57:25 CET 2011


Thanks.

So this will work?: (example in alerts.cfg)
HOST=www.foo.com SERVICE=http
MAIL cio at foo.com 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 <sjcarr at gmail.com> 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 <tsztur at gmail.com> 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!
>>
>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/mailman/listinfo/xymon
>>
>>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20111223/f5ca9d77/attachment.html>


More information about the Xymon mailing list