nv-l
[Top] [All Lists]

RE: [nv-l] Cursed Cisco Trap Formats

To: "Barr, Scott" <Scott_Barr@csgsystems.com>
Subject: RE: [nv-l] Cursed Cisco Trap Formats
From: James Shanks <jshanks@us.ibm.com>
Date: Thu, 3 Oct 2002 16:11:22 -0400
Cc: nv-l@lists.tivoli.com
I'm a bit confused here.  The error message about variables accessed is 
from trapd and only affects the way the trap is shown in the trapd.log and 
the event window.  The PDU structure passed to the ruleset should be 
unaffected.  As has been noted, you can get around the error  by using $* 
to display all the variables or by making multiple copies of the trap with 
slightly different names and specifying a host list for which nodes each 
definition applies to.

As for the rulesets, there was a new variable introduced called 
$NVATTR_COUNT  which may help, but I don't remember what release it was 
introduced in, but it is available to scripts launched from an action 
node. It counts what is passed in.  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) 

Does this help?

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 03:15 PM

 
        To:     <nv-l@lists.tivoli.com>
        cc: 
        Subject:        RE: [nv-l] Cursed Cisco Trap Formats

 

Once again GREAT idea. However see my original post

We do NOT used command for automatic action we use rulesets. In an action 
node I can call the script (which I do) but the trap data is not passed as 
command line arguments, it exists as environment variables and I have no 
way to know how many environment variables exist.

I'm not adverse to scripting. I have already tackled a number of other 
issues this way - the problem I have is determining how many variables are 
the trap environment data when I call my script to handle the variable 
format trap.


> -----Original Message-----
> From: Todd H. [mailto:netview@toddh.net]
> Sent: Thursday, October 03, 2002 1:59 PM
> To: Barr, Scott
> Cc: nv-l@lists.tivoli.com
> Subject: Re: [nv-l] Cursed Cisco Trap Formats
> 
> 
> 
> "Barr, Scott" <Scott_Barr@csgsystems.com> writes:
> > 
> > So, let me go back to my original request - how can I handle this
> > with automation?
> 
> Use $* in the trap format for that OID/generic/specific that comes in.
> That'll shut trapd up and let it gracefully deal with the variability.
> 
> Then script a command (using ksh, Perl, or even C if ya like) for
> automatic action that handles 3 4 or 5 varbinds appropriately as you
> wish.  Send an event to TEC then with postemsg. 
> 
> The scripting is left as an (albeit fairly straightfoward) exercise to
> the user.   You have a situation that requires some customization via
> scripting, and I'm afraid no one can shield you from having to do that
> scripting. 
> 
> Best Regards,
> -- 
> Todd H.
> http://www.toddh.net/
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)





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

Archive operated by Skills 1st Ltd

See also: The NetView Web