nv-l
[Top] [All Lists]

RE: [nv-l] error w/ mib2trap

To: nv-l@lists.us.ibm.com
Subject: RE: [nv-l] error w/ mib2trap
From: James Shanks <jshanks@us.ibm.com>
Date: Fri, 7 Apr 2006 08:47:39 -0400
Delivery-date: Fri, 07 Apr 2006 13:48:01 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <4.3.2.7.2.20060407120810.01789d08@pop.ozemail.com.au>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Good call, Joe.  The parser parses on spaces, commas, parens, braces and
other punctuation; so if there's no separator, then there is no way for the
parse to tell that "label::=" is really supposed to be "label ::="

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


                                                                           
             Joe Fernandez                                                 
             <jfernand@kardini                                             
             a.com>                                                     To 
             Sent by:                  nv-l@lists.us.ibm.com               
             owner-nv-l@lists.                                          cc 
             us.ibm.com                                                    
                                                                   Subject 
                                       RE: [nv-l] error w/ mib2trap        
             04/06/2006 10:35                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             nv-l@lists.us.ibm                                             
                   .com                                                    
                                                                           
                                                                           




James, Glen,

It's not easy to pick in the email but line 7190 has no whitespace between
the MIB data type identifier CMediaGwEntry and the ASN.1 assignment
operator ::=

The NetView compiler does not seem to permit this.

Glen,
   as a work around you need to replace

CMediaGwEntry::= SEQUENCE {
by
CMediaGwEntry ::= SEQUENCE {

i.e. insert a blank before the ::=

I have tried running mib2trap on one of our NetView 7.1.4 systems on RedHat

on this MIB after inserting a blank at each of a few occurrences of this
pattern in this MIB and mib2trap then runs successfully.



At 02:34 PM 06-04-06 -0400, you wrote:
>Glen,
>
>I wish this were a science, but it is an art, given where we are today.
My
>apologies and best wishes for good luck.  But if gets too difficult, then
>you'll have to call Support.  If they cannot resolve it, it will get
>escalated.
>
>I cannot tell you offhand what the problem is only that the parser has
>reached an impasse and cannot resolve what he's looking at into the one
the
>internally defined data types he's expecting.  That's what "Bad Operator"
>means.  But SEQUENCE is a recognized data type (assuming there's a closing
>brace after what you have posted) so I don't think that's the exact
>problem.
>
>Compiling MIBs is like compiling source code and often the line the
>compiler tells you the problem is at, is really the line where he first
>noticed it or became too confused to continue.  I think that's what's
>happened here.
>
>I usually tell people to load the MIBs first, with xnmloadmib2, into the
>default database or into one of their own,  because they have a better
>chance that way of determining whether there's anything else they need to
>resolve all the various pieces.
>
>Regretfully, that's the only advice I can give you.
>
>James Shanks
>Level 3 Support  for Tivoli NetView for UNIX and Windows
>Tivoli Software / IBM Software Group
>
>
>
>              "Glen Warn"
>              <Glen.Warn@pemcoc
>              orp.com>
To
>              Sent by:                  <nv-l@lists.us.ibm.com>
>              owner-nv-l@lists.
cc
>              us.ibm.com
>
Subject
>                                        RE: [nv-l] error w/ mib2trap
>              04/06/2006 02:11
>              PM
>
>
>              Please respond to
>              nv-l@lists.us.ibm
>                    .com
>
>
>
>
>
>
>Hi James,
>
>I apologize for my correctly execute your straightforward instructions.
>I'm trying each of your suggestions, just so I can better understand the
>ins and outs of Netview better.  I opened the mib in question and found
>it's import section.  It wants several MIBs (see below) which I've
>compiled into a single file using a text editor.
>
>    IMPORTS
>       MODULE-IDENTITY,
>       OBJECT-TYPE,
>       NOTIFICATION-TYPE,
>       Counter32,
>       Counter64,
>       Gauge32,
>       Integer32,
>       Unsigned32
>           FROM SNMPv2-SMI
>
>       TEXTUAL-CONVENTION,
>       DisplayString,
>       TimeStamp,
>       TimeInterval,
>       TruthValue
>           FROM SNMPv2-TC
>
>       MODULE-COMPLIANCE,
>       OBJECT-GROUP,
>       NOTIFICATION-GROUP
>           FROM SNMPv2-CONF
>
>       cmgwIndex
>           FROM CISCO-MEDIA-GATEWAY-MIB
>
>       ciscoMgmt
>           FROM CISCO-SMI;
>
>Now, when I run mib2trap against the concatenated file - it fails with
>this error "         Errors - no script generated.
>Bad operator: On or around line 7190"
>
>The first line below is line 7190
>CMediaGwEntry::= SEQUENCE {
>                    cmgwIndex              Integer32,
>                    cmgwDomainName         SnmpAdminString,
>                    cmgwPhysicalIndex      EntPhysicalIndexOrZero,
>                    cmgwServiceState       CGwServiceState,
>                    cmgwAdminState         CGwAdminState,
>                    cmgwGraceTime          Integer32
>
>Any ideas?
>
>-----Original Message-----
>From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com]
>On Behalf Of James Shanks
>Sent: Thursday, April 06, 2006 5:36 AM
>To: nv-l@lists.us.ibm.com
>Subject: Re: [nv-l] error w/ mib2trap
>
>The warning means that this MIB is not self-consistent and you need
>another
>MIB from the IMPORTS section in order to find the enterprise OID which
>is
>used in the -i parameter of addtrap.  It will not run to successful
>completion without it.  When you locate the other MIB, and it will be a
>Cisco one, concatenate the two into one big file and run mib2trap on
>that.
>
>James Shanks
>Level 3 Support  for Tivoli NetView for UNIX and Windows
>Tivoli Software / IBM Software Group
>
>
>
>
>              "Glen Warn"
>
>              <Glen.Warn@pemcoc
>
>              orp.com>
>To
>              Sent by:                  <nv-l@lists.us.ibm.com>
>
>              owner-nv-l@lists.
>cc
>              us.ibm.com
>
>
>Subject
>                                        [nv-l] error w/ mib2trap
>
>              04/05/2006 07:56
>
>              PM
>
>
>
>
>
>              Please respond to
>
>              nv-l@lists.us.ibm
>
>                    .com
>
>
>
>
>
>
>
>
>
>Running NV 7.1.4 FP3 on RH AS.21
>
>Have had this problem before, cannot recall work around.
>
>Trying to get traps defined for CISCO-IPSEC-FLOW-MONITOR-MIB.my
>
>Run mib2trap against it and works well (except for this warning at the
>beginning)
>Warning: The mib description doesn't seem to be consistent.
>  Some nodes couldn't be linked under the "iso" tree.
>  These nodes are left:
>
>And this at the bottom
>Enterprise object id not found for trap cikeTunnelStart,
>(6,1).Enterprise
>object id not found for trap cikeTunnelStop, (6,2).Enterprise object id
>not
>found
>  for trap cikeSysFailure, (6,3).Enterprise object id not found for trap
>cikeCertCrlFailure, (6,4).Enterprise object id not found for trap
>cikeProtocolFailu
>re, (6,5).Enterprise object id not found for trap cikeNoSa,
>(6,6).Enterprise object id not found for trap cipSecTunnelStart,
>(6,7).Enterprise object id not
>  found for trap cipSecTunnelStop, (6,8).Enterprise object id not found
>for
>trap cipSecSysFailure, (6,9).Enterprise object id not found for trap
>cipSecSetUp
>Failure, (6,10).Enterprise object id not found for trap
>cipSecEarlyTunTerm,
>(6,11).Enterprise object id not found for trap cipSecProtocolFailure,
>(6,12).En
>
>Now that I have a script to run, I do but it returns this over and over
>again.
>
>Usage: /usr/OV/bin/addtrap -n enterprise-name
>           -l trap-label
>           -i ent-object-id
>           -g gen-trap
>           -s spec-trap
>           -o source-ID
>           -S severity-flag
>           -t status-type
>           -c category
>           -F format-specification
>          [-C command]
>          [-d display] ]
>          [-D description] ]
>          [-N node list] ]
>          [-e TEC Class Name] ]
>          [-E TEC Slot Name] ]
>          [-V TEC Slot Value] ]
>          [-T do not send FMTCHG event to trapd ]
>  If arguments contain space, use the double quotation mark.
>
>Here is a sample from the beginning of the script.
>
>/usr/OV/bin/addtrap -l cikeTunnelStart -g 6 -s 1 \
>    -n cipSecMIBNotifications  \
>    -o A  -c "LOGONLY" -t 0 \
>    -S 1  \
>    -T \
>    -D "This notification is generated when an IPsec Phase-1
>IKE Tunnel becomes active."  \
>    -e cikeTunnelStart  \
>    -F '$E $G $S $# args: $*'
>
>I've also tried running the first step manually and it fails too.  Am
>tinkering to see where but here is the command I've used.
>
>/usr/OV/bin/addtrap -l cikeTunnelStart -g 6 -s 1 -n
>cipSecMIBNotifications
>-o A  -c "LOGONLY" -t 0 -S 1 -T -D "This notification is generated when
>an
>IPsec Phase-1 IKE Tunnel becomes active." -e cikeTunnelStart -F '$E $G
>$S
>$# args: $*'

Joe Fernandez
Kardinia Software
jfernand@kardinia.com
www.kardinia.com





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

Archive operated by Skills 1st Ltd

See also: The NetView Web