TWiki Webs: Main TWiki Netview
Edit | Attach | Ref-By | Printable | Raw Text | Diffs | r1.1 | More
Content
Netview web home Register Changes Index Search

Go to topic

Change Password
Links
NetView global user group IBM NetView product page nv-l mailing list archive
If testing TRAP customisations, it is handy to have a small harness program that drives the snmptrap program - that way it's easier to get the syntax correct, especially if your TRAP has several varbinds that you need to generate!

#!/bin/ksh
#
# Generate a sample trap
# Send trap using the snmptrap supplied with NetView in /usr/OV/bin
# Trap here is Enterprise 1.3.6.1.4.1.1234, trap 123
# Ensure you change the line for MANAGER to be your NetView Server
#
# Uncomment next line for extra debugging
#set -x
MANAGER=sunshine.skills-1st.co.uk
HOST=poppet.skills-1st.co.uk
ENTERPRISE=.1.3.6.1.4.1.1234
GENTRAP=6
SPECTRAP=123
TRAPVAR=.1.3.6.1.4.1.1234.123
VARBIND1="Hello world"
TIMESTAMP=1
#
/usr/OV/bin/snmptrap $MANAGER $ENTERPRISE $HOST $GENTRAP $SPECTRAP $TIMESTAMP   $TRAPVAR OctetString "$VARBIND1"
#

-- JaneCurry - 26 Apr 2004