We did something similar when we were required to send alarms to TBSM.
We just replaced the MAIL line with the script/app and their arguments.
Here's the clip of the setscript we used for TBSM, we were using an app called
postemsg.exe that we dropped into the Notifier directory.
# commented out the MAIL line
then
echo " "
echo "*******************************************************************"
echo "Sending mail to $RECIPIENTS:"
echo ""
echo "($RCVRS)"
echo "*******************************************************************"
echo_info | tee -i /tmp/set_alarm.$PID
# $MAIL -s "A $SEV alarm has occured on $SERVER (Model Name=$MNAME)(Model
Type=$MTYPE)" $RCVRS < /tmp/set_alarm.$PID
./postemsg -S $RCVRS -r $TIVSEV -m "$EVENTMSG" hostname=$MNAME
alarm_id=$AID status=$TIVSTAT Spectrum_Base SPECTRUM
rm -f /tmp/set_alarm.$PID
else
echo " "
echo "*****************************************************"
echo "NO $RECIPIENTS assigned - no mail sent"
echo "*****************************************************"
echo_info
fi
Phillip L Stallcup, CCNA
INTEGRIS Health
IT Network Architect
(405) 951-2088
From: Calvin Lane [mailto:[email protected]]
Sent: Monday, August 15, 2011 2:55 PM
To: spectrum
Subject: [spectrum] SetScript examples
Hello everyone,
I'm looking for setscript examples that show calling an external
sript/application from the setscript. For example, I have a box that that the
snmp service frequently shuts down on. When that happens I get the obvious
"Device Has Stopped Responding To Polls" alarm. Once SANM picks up that alarm
in the filter, I want the setscript to go to the box in question and then
restart snmp. I have an idea how I want to do it, I'd just like to know what
the experience of others has been with similar requirements. Has anyone done
that or something similar to it before? Thanks.
Calvin Lane
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum
[email protected]<mailto:[email protected]>
**********************************************************************
This e-mail may contain identifiable health information that is subject to
protection under state and federal law. This information is intended to be for
the use of the individual named above. If you are not the intended recipient,
be aware that any disclosure, copying, distribution or use of the contents of
this information is prohibited and may be punishable by law. If you have
received this electronic transmission in error, please notify us immediately by
electronic mail (reply).
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]