nv-l

Re: [nv-l] Cursed Cisco Trap Formats

2002-10-03 16:48:50
Subject: Re: [nv-l] Cursed Cisco Trap Formats
From: netview AT toddh DOT net (Todd H.)
To: "Barr, Scott" <Scott_Barr AT csgsystems DOT com>
Date: 03 Oct 2002 15:48:50 -0500
"Barr, Scott" <Scott_Barr AT csgsystems DOT com> writes:

> 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. 

Action nodes I believe pass the script arguments similarly. 
NVATTR_1
NVATTR_2
NVATTR_3
NVATTR_4
NVATTR_5
...

Test em to see which exist and/or are blank, and off ya go. 

Or... have your script do 
        env | grep NVATTR | wc -l    

and you may have then know how many got passed.  You'll have to play
around with it. 

It's a royal pain when vendors change stuff like this and we're stuck
managing devices of various levels that send different things in their
traps.  I think I support about 5 different incarnations of Nokia's
VrrpTrapNewMaster, at least 2 of them with the same OID
generic/specific.

-- 
Todd H.
http://www.toddh.net/