nv-l
[Top] [All Lists]

Re: [nv-l] Passing OID from TRAP to script???

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] Passing OID from TRAP to script???
From: Jeff Fitzwater <jfitz@princeton.edu>
Date: Tue, 03 Feb 2004 09:27:27 -0500
Delivery-date: Tue, 03 Feb 2004 14:37:14 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
Organization: OIT Systems & Networking
References: <OFA6A35BC6.E587B03D-ON85256E2F.00490048@us.ibm.com>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
James Shanks wrote:
 

Well, I'm afraid you will have to get rather creative here, because the answers are just what you already expect.

1. Command for automatic action is available only under the events window. It will send the entire formatted string of the message text that was passed to nvevents.

2. What all the daemons (nvcorrd, ovactiond) get is not the trap itself but an event structure which contains the data passed in the trap, but not the MIB identifier for that data.

Offhand, I don't know what to tell you. Most traps contain data in fixed positions, with each varbind representing the same MIB OID every time. That is the standard model used by almost all vendors and it is what is recommended by the IETF. That's the model that NetView uses. The OID is the wrapper, if you will, and it is discarded, after the data is unwrapped.

James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group
Inactive hide details for Jeff Fitzwater <jfitz@princeton.edu>Jeff Fitzwater <jfitz@princeton.edu>
 
 
          Jeff Fitzwater <jfitz@princeton.edu>
          Sent by: owner-nv-l@lists.us.ibm.com

          02/02/04 05:08 PM
          Please respond to nv-l

To: Netview <nv-l@lists.us.ibm.com>
cc: 
Subject: [nv-l] Passing OID from TRAP to script???

Netview 7.1.4
Sol 2.8

I need to extract the OID from a BGP trap that contains an IP address.

I set up a RULSET to pass the BGP trap GENERIC 6 SPECIFIC 2
and pass that to an ACTION NODE that points to my script and also passes the following fields, as the online HELP staes I can do..

/tmp/bin/testtrap $-1 $-2 $-3 $NVA NOTE: I have tried many different values and formats here with no luck.

I use the following to TEST the trap...

snmptrap 128.112.x.x .1.3.6.1.2.1.15 router1 6 2 0 .1.3.6.1.2.1.15.3.1.128.112.152.173 integer 6

As you; can see I am only passing one variable (.1.3.6.1.2.1.15.3.1.128.112.152.173) with a value of 6

This sends the peering status for the stated peer.

The script that runs extracts all ENV variables and ARGs passed and puts them in a file .

I get the NVA passes as an ARGs and NO other information.

I get NVA, E, T, etc. NVATTR_1 etc. as ENVs vars if they exits, but NO BGP OID for the variable, which contains the IP of the peer that failed.

IF I use the COMMAND FOR AUTOMATIC ACTION and pass everything as AGRUMENTS as I did with the RULESET, I DO get the OID.

So the RULSET fails but the AUTOMATIC ACTION works.

Q. Is there a way to pass/ extract the OID via RULESET or does OVACTIONd strip this stuff out?

Can I only get it by using the COMMAND FOR AUTOMATIC ACTION under EVENT CONFIGURATION?
 

Thanks for any help.
 

Jeff Fitzwater
OIT Systems & Networking
Princeton University
 
 
 
 

Thanks for the answer James.   The  COMMAND FOR AUTOMATIC ACTION will work, but I don't like changing those pieces to make "user" scripts work.

What would I have to save in order to maintain a backup of what I change in XNMTRAP?
 
 
 

Jeff Fitzwater
OIT Systems & Networking
Princeton University

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web