Thanks.<br><br>So this will work?: (example in alerts.cfg)<br>HOST=<a href="http://www.foo.com">www.foo.com</a> SERVICE=http<br>MAIL <a href="mailto:cio@foo.com">cio@foo.com</a> DURATION>2 COLOR=red<br>SCRIPT /usr/local/bin/restartapache.sh<br>
<br>and in restartapache.sh I would have the following:<br>#/bin/bash<br>ssh xymon@web1-server 'sudo /etc/init.d/apache2 restart'<br>exit<br>(considering xymon is in the sudoers list)<br><br>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?<br>
<br>TIA<br><br><br><div class="gmail_quote">On Fri, Dec 23, 2011 at 3:07 PM, Steven Carr <span dir="ltr"><<a href="mailto:sjcarr@gmail.com">sjcarr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Take a look at the alerts.cfg man page... <a href="http://www.xymon.com/xymon/help/manpages/man5/alerts.cfg.5.html" target="_blank">http://www.xymon.com/xymon/help/manpages/man5/alerts.cfg.5.html</a><br><br>You can configure an alert to trigger a custom script, that script could then run off and do whatever you need it to do.<br>

<br>Steve<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">On 23 December 2011 20:01, Tom S <span dir="ltr"><<a href="mailto:tsztur@gmail.com" target="_blank">tsztur@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
It would be nice to have some way to have XYMON do 'corrective measures' for an alert.<br>example: if Apache was  hanging yet the connection to a client system was OK, to log on with ssh and restart Apache2.<br><br>


is there a way to implement this easily?<br><br>TIA!<br>
<br></div></div>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br>