I have the following shell script (retry5) which
should allow for a failure up to 5 times before an actual email is sent to avoid
alerts on basic hiccups:
#!/bin/sh
# TMPFILE=/tmp/retry5.$$ trap "/bin/rm -f $TMPFILE" 0 1 13 15 DIR=`dirname $0` for i in 1 2 3 4 5 6 ; do $DIR/"$@" > $TMPFILE ret=$? case $ret:$i in 0:* | *:6 ) break ;; * ) sleep 30 ;; esac done /bin/cat $TMPFILE /bin/rm -f $TMPFILE exit $ret Now, in my config file for MON, I have placed it
like this:
watch wwwservers
service http interval 1m monitor http.monitor retry5 period wd {Sun-Sat} alert mail.alert [EMAIL PROTECTED] alert file.alert /opt/mon-0.99.1/etc/log.d/mon_alerts upalert mail.alert [EMAIL PROTECTED] upalert file.alert /opt/mon-0.99.1/etc/log.d/mon_alerts alertevery 3m The retry5 script is set to executable, but it
shows in the subject of my email, and it doesn't seem to be going through the
retry motions.
Am I just placing this in the wrong area in the
config -- or does any one of an easier way to handle this?
Thank you
--
----------------------------- InteleNet Communications Inc. "Help me help you." Chance Ervin - SCSA -- Jerry Maguire Oracle Certified Professional Operations Supervisor |
_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon