nv-l

Re: Rulesets and Parsing Traps

1999-10-27 13:05:08
Subject: Re: Rulesets and Parsing Traps
From: James Shanks <James_Shanks AT TIVOLI DOT COM>
To: nv-l AT lists.tivoli DOT com
Date: Wed, 27 Oct 1999 13:05:08 -0400
Ingenious!  Nice try!  But I am sorry to tell you that what you have attempted,
while very clever,  won't work.

 You see, nvserverd is not sending the exported variables NVATTR_x.  Those are
only exported in an action node for use by actionsvr who will execute your
action.  nvserverd is the guy who runs the internal TEC adapter, which builds
the TEC event in the correct format and sends it.  He gets a structure from
nvcorrd with the original trap in it, and he takes the actual elements out of
there, and builds the formatted output for TEC using the format stored in
trapd.conf.  In other words, nvserverd is oblivious to what is or is not
exported in the NVATTR_x variables.   The only way you can influence what is
sent  is by slot mappings.  But I don't see how you can arrive at the IP address
using those, since you cannot specify an executable to populate one.  All you
could do is add something like the hostname in var2 as a new slot variable.

There are two other techniques I have seen by other folks to get more info sent
to TEC than what is provided in the trap.  One method is to use the ruleset to
take the trap you want, and run a script which calls snmptrap to generate a new
trap with the new variables you want, and have that sent to TEC instead of the
first one.  The second is to do the same thing but have the script issue the TEC
wpostemsg command, but that requires you to have more installed than just
NetView on the NetView box. Either way could also be done as an automatic action
from trapd.conf instead of the ruleset method as well, since no real correlation
has to be done.

James Shanks
Tivoli (NetView for UNIX) L3 Support



"Joel A. Gerber" <joel.gerber AT USAA DOT COM> on 10/27/99 12:33:34 PM

Please respond to Discussion of IBM NetView and POLYCENTER Manager on NetView
      <NV-L AT UCSBVM.UCSB DOT EDU>

To:   NV-L AT UCSBVM.UCSB DOT EDU
cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  Rulesets and Parsing Traps




I am trying to implement event correlation in TEC for the HSRP deleted and
HSRP added traps.  I would like to send the IP address from the trap to TEC
as a separate slot variable.  A recent posting provided a good solution for
parsing the trap.  I have tried putting this command in an Inline Action
node in the ruleset:

export NVATTR_6=`set -A ATTR $NVATTR_3; print ${ATTR[2]}`

I know that the parsing is working properly because I put a similar command
in an Action node, and logged it to a file.  I am getting the IP address
extracted from the trap variable #3.  I think that my problem might be
trying to set the value of the new variable, $NVATTR_6.  Do I have to do
anything special with the slot mappings in the event configuration for the
IBM_NVHSRPADD_EV event?  Trap variables 1-5 are already being passed by the
event adapter to TEC without any slot mappings defined, so I did not think
that this would be needed.

Has anyone tried something like this before with rulesets and TEC, and have
some suggestions?  If anyone has a different approach to solving the event
correlation issue, I'd be interested in that, too.

THANKS!

Joel Gerber - I/T Networking Professional - USAA Information Technology Co.
- San Antonio, TX

"I love deadlines. I especially love the swooshing sound they make as they
go flying by."
Dilbert's Words of Wisdom


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