[Xymon] alert script timing issue?

Kevin VerMeer KVerMeer at peoplenetonline.com
Fri Apr 4 17:05:25 CEST 2014


I have set up a SCRIPT in alerts.cfg that runs when connectivity to any monitored client goes red.

HOST=* SERVICE=conn COLOR=red
        SCRIPT /usr/local/xymonutil/alertscripts/noconnectivity.sh DURATION>15 REPEAT=15 RECOVERED

Inside the script, it does a few things, one of which is to get the NAME associated with the client reporting the issue.
It does this by:
STATION=`$XYMON $XYMONSERVERHOSTNAME "hostinfo host=$BBHOSTNAME" | $SED -e 's/|/\n/g' | $GREP NAME | $CUT -d: -f2`

I have seen instances where connectivity is lost to several clients at the same time, and it appears that this STATION value is getting the same value for different lost connections.

For example, if there are 2 clients, with NAME value of STATION1 and STATION2, and connectivity is lost to both clients at the same time, the SCRIPT is run two times, but each run of the script will get STATION2 as the result of the above command.

As there anything wrong with my logic?
Is there a better/different way to approach this?

Any thoughts or suggestions are appreciated.
Thanks.

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140404/d5bea00d/attachment.html>


More information about the Xymon mailing list