[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Suitability for bb replacement in large enterprise
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Suitability for bb replacement in large enterprise
- From: Henrik "Størner" <henrik (at) hswn.dk>
- Date: Tue, 9 Dec 2008 06:57:41 +0000 (UTC)
- Newsgroups: lists.hobbit
- Organization: Linux Users Inc.
- References: <493AEDCE.9060107 (at) tmsusa.com> <493BA976.10803 (at) unil.ch> <493BA976.10803 (at) unil.ch> <200812081608.21732.bgmilne (at) staff.telkomsa.net> <ghk55o$ccr$1 (at) voodoo.hswn.dk> <ghk55o$ccr$1 (at) voodoo.hswn.dk> <493DA5AF.1080704 (at) tmsusa.com>
- User-agent: nn/6.7.3
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