I think you are asking about running the addtrap script multiple times.
Yes, you can. That's entirely feasible and won't hurt anything.
Many people keep those addtrap scripts around so they can make global
changes to them (change "LOGONLY" to "Node Configuration Events" for
example) and re-run them, or pass them between copies of NetView. Each
subsequent addtrap will overlay whatever's already in trapd.conf for that
event.
But don't tamper with the -T flag. Without a -T, the last thing addtrap
will do is send a FMTCHG event to trapd, which will cause him to re-load
the trapd.conf file, and he'll get to spinning like a top if he gets
multiple FMTCHG events in a row, telling him to reload the file before he's
finished from reloading the last time. That's what the -T flag was added.
Only the last addtrap in your script should be without it.
By the way, if you should find that you aren't seeing your new definitions
being picked up, and you haven't seen a "format changed" message in the
trapd.log in awhile, then you can cause the reload yourself, with "event -e
FMTCHG".
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 01:18
PM
Please respond to
nv-l@lists.us.ibm
.com
Hi James,
Thanks for the great info. Can I simply concatenate the files, run
mib2trap and then run the output script again (overwriting whatever is
there) or would that cause a problem?
-----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: $*'
|