[hobbit] Suitability for bb replacement in large enterprise
Henrik Størner
henrik at hswn.dk
Tue Dec 9 07:57:41 CET 2008
In <493DA5AF.1080704 at tmsusa.com> J Sloan <joe at tmsusa.com> writes:
>Yes, it's very simple and straightforward: send out an snmp trap based
>on an event, per the bbwarnrules.cfg, just like the email alerts. If
>hobbit can be made to do that, one of the two key requirements would be
>met, and only the failover behaviour would still need to be resolved.
In hobbit-alerts.cfg you'd have something like
HOST=* TEST=disk
SCRIPT /usr/local/bin/trapmessage 0
Then your /usr/local/bin/trapmessage would do the trap-sending.
E.g. using Net-SNMP tools and the defaults from BB's bbwarnsetup.cfg:
#!/bin/sh
OID="enterprises.7058" # 7058 is the Big Brother OID
SNMPSTATION="10.3.2.1" # IP of your monitoring system
# BB maps a service to a numeric trapcode. See the
# 'trapcodes' definition in bbwarnsetup.cfg
# Add those you use here.
case "$BBSVCNAME" in
"disk")
TRAPCODE="2"
;;
"cpu")
TRAPCODE="4"
;;
esac
# ... and adds 1 if the status has recovered
if test "$RECOVERED" = "1"
then
TRAPCODE=`expr $TRAPCODE + 1`
fi
snmptrap -v1 -c public $SNMPSTATION $OID \
$BBHOSTNAME 6 $TRAPCODE '' $OID s "$BBALPHAMSG"
exit 0
Regards,
Henrik
More information about the Xymon
mailing list