nv-l
[Top] [All Lists]

Re: Comparing variables sent in traps

To: nv-l@lists.tivoli.com
Subject: Re: Comparing variables sent in traps
From: "Jeffrey G. Fitzwater" <jfitz@Princeton.EDU>
Date: Fri, 09 Mar 2001 13:42:21 -0500
"Treptow, Craig" wrote:

> Hi Jeff.
>
> Thanks for the help, but forgive me if I'm a little dense on this.
>
> How did this help with what I'm trying achieve?  Are you saying the shell 
> script will do all the logic I want and that it would turn around and decide 
> if I want to send another trap, page somebody, etc.??
>
> Thanks.
>
> Craig
>
> > -----Original Message-----
> > From: Jeffrey G. Fitzwater [mailto:jfitz@Princeton.EDU]
> > Sent: Friday, March 09, 2001 11:16 AM
> > To: IBM NetView Discussion
> > Subject: Re: [NV-L] Comparing variables sent in traps
> >
> >
> > "Treptow, Craig" wrote:
> >
> > > Hi.  We are running Netview 6.0.1 on AIX 4.3.  I have the
> > frame-relay MIB loaded (1.3.6.1.2.1.10.32) and am receiving
> > "frDLCIStatusChange" traps from our routers.  In our event
> > definition we see that the third parameter passed is the new
> > Circuit state (1=invalid, 2=active, 3=inactive).
> > >
> > > I can do logic with other traps (link_down, if link_up
> > within 1 minute, then resolve and don't display), etc.  I
> > would like to perform logic like this with the DLCI status
> > change traps, but I'm not sure how I compare the values.
> > Does something allow me to compare the third parameter to a
> > literal value, and then I can handle it similar to other things?
> > >
> > > I'll bet I'm just not understanding something in the
> > rulesets well enough, but I'm not sure what, and I haven't
> > found anything in the archives of this list that have helped
> > me with this.
> > >
> > > Hints and ideas are appreciated.
> > >
> > > Thanks!
> > >
> > > Craig Treptow
> > > Principal Financial Group
> > > I/S Network Administration
> > >
> > >
> > ______________________________________________________________
> > ___________
> > > NV-L List information and Archives: http://www.tkg.com/nv-l
> >
> > Hi Craig.
> >
> > Thats kind of what I am doing now and what I do is first
> > build a simple ruleset to capture the enterprize trap and
> > then just send it to a shell script with an ACTION tool.   In
> > the script I first use the shell "export" command to bring in
> > the Netview variables I need ie.. NVA   NVATTR_<1-50>
> > See page 189 of admin guide.  Now the variables are there for
> > the shell to use.
> >
> > I used a simple AWK script to extract them.  Like this...
> >
> > export NVA NVATTR_3
> > nawk '
> > BEGIN {
> >         print ENVIRON["NVA"] > "/tmp/dupaddr.nva"
> >         print ENVIRON["NVATTR_3"] > "/tmp/dupaddr.att3"
> >
> > }'
> >
> > You get the idea from this small piece.   You can do similar
> > things with perl.
> >
> > Jeff F.
> >
> > ______________________________________________________________
> > ___________
> > NV-L List information and Archives: http://www.tkg.com/nv-l
> >
> _________________________________________________________________________
> NV-L List information and Archives: http://www.tkg.com/nv-l

Yes,  you can do all you want from within the shell.   You would compare the 
variable with a know value and perform some action if match occurs (and or ) 
send email page or run OV command to trigger another
trap.   You can continue on with the ruleset if you wish but I am not sure if 
you need the INLINE ACTION to get back to the ruleset.

I know it's hard to explain everything you may need to know.  Sorry.


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

Archive operated by Skills 1st Ltd

See also: The NetView Web