Hi,
James suggested this tip to me recently on the forum, (running
xnmloadmib2 -mibDB ...) and it worked remarkably well - I would highly
recommend this method to anyone having trouble creating traps from mibs
- it gave me complete control over what was happening (and helped me in
understanding the process better.)
Cheers James.
Regs
Colin M.
-----Original Message-----
From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com]
On Behalf Of James Shanks
Sent: 06 April 2006 14:15
To: nv-l@lists.us.ibm.com
Subject: RE: [nv-l] error w/ mib2trap
Glen,
mib2trap works on files, not on the MIB database. So all the MIB
definitions needed to resolve the traps must be in one file. If they
are spread over multiple files, then you have to gather them all into
one big one.
But before you do that, or any more of this, let me give you a tip. If
you plan running a whole bunch of vendor traps through mib2trap, then my
advice is to build a little mini MIB database for just them.
You would use xnmloadmib2 for that, since it has the same parser as
mib2trap. Two ways to do this.
(1) rename /usr/OV/conf/ snmpv2mib and snmpv2mib.bin to something else
for safe keeping.
(2) start loading all the MIBs you want to run mib2trap on and keep
adding MIBs until you don't get any more warnings or errors. Use the
IMPORTS sections to tell you what other MIBs you need for resolution
when you get error. Usually these are vendor MIBs and not RFC's.
(3) When you finish step (2), run mib2trap on /usr/OV/conf/snmpv2mib.
It's a big text file of all the MIBs you loaded to get one consistent
whole.
(4) When mib2trap is finished, you can rename the new /usr/OV/conf/
snmpv2mib and snmpv2mib.bin files to something else (for safe keeping
case you want to do this again) and restore the old ones.
It's also possible to skip the rename game altogether and run
xnmloadmib2 from the command line with the -mibDB option to specify a
new MIB database file of your choosing and run mib2trap on that instead.
For each vendor you want to add a lot of traps for, you van build a
little mini database of just his stuff for mib2trap to work with.
HTH
James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group
James
Shanks/Raleigh/IB
M@IBMUS
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 08:38
AM
Please respond to
nv-l@lists.us.ibm
.com
-T is valid though it may not be documented at you level of code. It
tells addtrap not to send the FMTCHG event to trapd. This flag is added
by mib2trap to prevent trapd from getting into a loop re-reading the
trapd.conf file when many new traps are being added at once.
You problem is the -i, not -T.
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/05/2006 08:32
PM
Please respond to
nv-l@lists.us.ibm
.com
I think I fixed this. After going thru each parameter I found there is
no T option for addtrap. I also saw that the -i parameter wasn't being
issued. I did a search and replace on the -T with a -i
1.3.6.1.4.1.9.9.171.2 and reran the script. It seems to have worked
fine. Does anyone have any input on the -T (specifically why would
mib2trap put it there?) Not sure which of the 2 actually was the fix,
but it did run w/o error now.
From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com]
On Behalf Of Glen Warn
Sent: Wednesday, April 05, 2006 4:57 PM
To: nv-l@lists.us.ibm.com
Subject: [nv-l] error w/ mib2trap
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: $*'
*********************************************************************************
This e-mail and its attachments, is confidential and is intended for the
addressee(s) only. If you are not the intended recipient, disclosure,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. Please note that any information expressed in this message or its
attachments is not given or endorsed by An Post unless otherwise indicated by
an authorised representative independently of this message. An Post does not
accept responsibility for the contents of this message and although it has been
scanned for viruses An Post will not accept responsibility for any damage
caused as a result of a virus being passed on.
*********************************************************************************
|