|Subject:||Re: [nv-l] Rule Set Testing|
|From:||James Shanks <firstname.lastname@example.org>|
|Date:||Mon, 26 Apr 2004 09:42:16 -0400|
|Delivery-date:||Mon, 26 Apr 2004 14:49:04 +0100|
Unless these are NetView traps, and it does not sound as if they are, you cannot use event. The event command basically simulates NetView traps. You can get a list of those by issuing "event -l". See the man page on event for more details on the other options and how to specify them.
But to simulate non-NetView traps, you use snmptrap. The easiest way is to write a small shell script to issue the command. That way you have total control over the contents. Here's a simple example:
# 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
# "2 0" indicates link down; last number is dummy timestamp
# per Cisco the variables are
# ifIndex = $1
# ifDesc = $2
# ifType = $3
# locIfReason = $4
sailor.rtp.lab.tivoli.com .18.104.22.168.4.1.9 \
ferrari.raleigh.tivoli.com 2 0 1 \
.22.214.171.124.126.96.36.199.3.0 Integer 5 \
.188.8.131.52.184.108.40.206.4.0 OctetString "Serial2" \
.220.127.116.11.18.104.22.168.5.0 Integer 22 \
.22.214.171.124.126.96.36.199.6.0 OctetString "standby mode"
Note that the varbind OIDs .188.8.131.52.184.108.40.206.3.0, etc are entirely made up. You can send any OID you like. If you don't care what they are,
then you can just make them simple, like .1.1.0, .1.2.0, .1.3.0 and so on. trapd and nvcorrd won't care. All that matters to them is the enterprise id and
the specific trapd id
My guess is that before you test your ruleset you will need a copy of the trap you expect to trigger it.
You can get that by making the log message for that trap say "$*" and then trapd will print out all the variables to
the trapd.log. The you can write your script to duplicate it. Can't get that? Then you'll just have to guess.
When you test, don't forget to issue "nvcdebug -d all" first so that nvcorrd will log everything that happens when your
trap is received.
Hope this helps
Level 3 Support for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group
I have created a ruleset where I want a script to run when specific traps are received. I would like to test the ruleset. I know you can send a test node down event by using the command event -h nodename -e NDWN_EV. My question is where do I look to find the event name for the traps I would like to test. I cannot look at previous events because none have been generated. These events are for a very critical UPS system and I cannot wait for an event to happen to make sure things are set up correctly. I am running Netview 7.1.5 on AIX 5.1.0.
Debra L. Klingensmith
phone: (724) 830-5881
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||[nv-l] Rule Set Testing, Klingensmith, Debra L.|
|Next by Date:||Re: [nv-l] Rule Set Testing, Jane Curry|
|Previous by Thread:||[nv-l] Rule Set Testing, Klingensmith, Debra L.|
|Next by Thread:||Re: [nv-l] Rule Set Testing, Jane Curry|
|Indexes:||[Date] [Thread] [Top] [All Lists]|
Archive operated by Skills 1st Ltd
See also: The NetView Web