[Top] [All Lists]

Re: [nv-l] Réf. : Re: [nv-l] loading mib files (Mcafee)

To: nv-l@lists.tivoli.com
Subject: Re: [nv-l] Réf. : Re: [nv-l] loading mib files (Mcafee)
From: jshanks@us.ibm.com
Date: Fri, 28 Jun 2002 12:37:30 -0400
Actually, there is one more thing you can try, but it is almost as much 
work as the other.

You can run mib2trap against the entire text file of your loaded MIBs: 
/usr/OV/conf/snmpmib or /usr/OV/conf/snmpv2mib.

        /usr/OV/bin/mib2trap    <mib.text.file : /usr/OV/conf/snmpmib | 
/usr/OV/conf/snmpv2mib>  <addtrap.output.file>

will generate a large (possibly huge) addtrap script which will add all 
the traps defined in all your loaded MIBs.  You can then go cut-and-paste 
just the ones you want an add those.  If you run the whole script, it will 
replace any identical trap defs you already have with new ones, and that 
may be troublesome because the formatting, status, severity, and so on, 
will now be the default values rather than what you have already 
customized.  Most, if not all of the traps will become "Log Only" with a 
severity of 1,  for example.

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group

netview@toddh.net (Todd H.)
06/28/2002 12:05 PM
Please respond to nv-l

        To:     bducharme@avdl.com
        cc:     nv-l@lists.tivoli.com
        Subject:        Re: [nv-l] Réf. : Re: [nv-l] loading mib files  (Mcafee)


bducharme@avdl.com writes:
> They are SNMP V1.
> I've done the mib2trap command succesfully.
> But when i tried to execute the result of the mib2trap i got this error
> message:
> "If arguments contain space, use the double quotation mark."
> Here is the result of the mib2trap:
/usr/OV/bin/addtrap -l naiTrapWithAllFields -g 6 -s 9999 \
   -n nai  \
    -o A  -c "LOGONLY" -t 0 \
    -S 1  \
    -D "NAI Trap"  \
    -e naiTrapWithAllFields  \
    -F '$E $G $S $# args: $*'

> Can someone guide me to found what is the problem ?

What you're getting is the usage error for addtrap which says it
doesn't like something about the syntax.  The bit about arguments
containing a space is just the last portion of that help text. 

I don't see a numeric OID in your command with a -i which tradp.conf
needs.  Its absence probably indicates that you had errors or warnings
when running mib2trap that weren't addressed.

The trickiest part of mib2trap is that you need to concatenate enough
mib files together so the processor can diving the entire numeric
OID.  Start with the mib file you want, and analyze the INCLUDES
section and make sure that every file its dependent on is included in
the text file you feed to mib2trap. 

This is an exercise that's worth doing manually to understand the mib
file syntax, and how to build up that numeric OID by working backwards
from last digit to the first, through included files to get what you
need.  At least then you know how mib2trap has to think in order to
get that OID. 

I wish I had better news, but this is an ugly part of the learning
curve--a function of SNMP's not being quite as "simple" as the authors
might want you to believe.  8-)

The book "Understanding SNMP MIB's"  is very useful in easing this
learning process. 

Best Regards, 
Todd H. 

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

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>
  • Re: [nv-l] Réf. : Re: [nv-l] loading mib files (Mcafee), jshanks <=

Archive operated by Skills 1st Ltd

See also: The NetView Web