It might help if at the front of your script you just get 'em all and echo
them out. Then you could see them.
What we are counting is just the NVATTRs only (not all the environment
vars, like NVA).
There should always be three more than what the trap actually sends. So if
your trap sends 5 variables, then NVATTR_COUNT should be 8:
NVATTR_1 through NVATTR_5 will be what the the trap sends, NVATTR_6 will
be the category expressed as an integer, NVATTR_7 will be the source id
expressed as a string (e.g. "A"), and NVATTR_8 will be the severity
expressed as an integer.
James Shanks
Level 3 Support for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group
"Barr, Scott" <Scott_Barr@csgsystems.com>
10/03/2002 04:29 PM
To: <nv-l@lists.tivoli.com>
cc:
Subject: RE: [nv-l] Cursed Cisco Trap Formats
One more thing James -
> Note that when you use this in an action node, it will be three
variables higher than what was sent in the original trap, because
nvcorrd adds on three more elements from trapd.conf, when the action node
is called, so that you can reference them as environment variables. In
order they are (1) event category ( 0= "Threshold Events", 3= "Status
events", etc. see the man page on trapd.conf) (2) event source-id
(A=agent, N=netmon, etc. see the man page on trapd.conf)(3) event severity
(0=cleared, 1=indeterminate, 2=warning, 3=minor, 4=critical, 5==major)
Just to make sure I understand this, in my last script example with the
frame relay trap, there are at a minimum 8 environment variables ($NVA,
$NVATTR_1, $NVATTR_2, $NVATTR_3 plus the 3 you mention). Is that correct?
To Stephen Hochstter - that is another valid approach and I will pursue it
if this does not work out but I think James has the answer I need.
|