It sounds to me as though what you need most of all is a working example
you can modify.
Try this one:
#!/bin/ksh
# cisco.link.down.trap.sh
#
# sample shell script James Shanks 07/24/96 to send snmptrap
# for testing Cisco link down
#
#
# first hostname is recipient (NetView); second is sender
# hostnames must be valid in your network
#"generic id "2" specific id " 0" indicates link down;
# last number is dummy timestamp
#
# per Cisco the variables are
# ifIndex = $1
# ifDesc = $2
# ifType = $3
# locIfReason = $4
#
/usr/OV/bin/snmptrap \
'sailor.rtp.lab.tivoli.com' .1.3.6.1.4.1.9 \
'ferrari.raleigh.tivoli.com' 2 0 1 \
.1.3.0 Integer 5 \
.1.4.0 OctetStringascii "Serial2" \
.1.5.0 Integer 22 \
.1.6.0 OctetStringascii "standby mode"
Hope this helps.
James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group
|