This is a discussion on RE: periodic TRAP watcher! - SNMP ; > From: firstname.lastname@example.org > [mailto:email@example.com] On > Behalf Of Raghavendra Prasad > Sent: Friday, February 29, 2008 12:14 AM > > I would recommend against implementaing a watchdog > as part of a MIB. Rather, a standalone application which > ...
> From: firstname.lastname@example.org
> [mailto:email@example.com] On
> Behalf Of Raghavendra Prasad
> Sent: Friday, February 29, 2008 12:14 AM
> > I would recommend against implementaing a watchdog
> as part of a MIB. Rather, a standalone application which
> generates the > > >traps frees you from such concerns.
> Well, could you please explain what you mean by developing watchdog as
> part of MIB?
I should have said "as part of a subagent", or "as part of a MIB implementation".
> Let me explain what I intend to do - I use mib2c.scalar.conf file to
> generate the trap watchdog souce-code frame work, which hooks traps to
I'm not sure what you mean by this. An OID is an object identifier, a set of numbers constructed using a certain set of rules, preferably in conjunction with one of the official registrars to ensure universal uniqueness.
> Yes you are right traps might not even be associated with OIDs,
I did not say that. Every trap has an OID.
> then it makes sense to develop it as a parallel standalone
> application. Currently my trap watcher is also a standalone
> application but implemented as part of MIB(I mean generated from
I have *no* idea what you mean here. mib2c is a tool used to generate implementation code based upon the MIB definition file. The mib2c.scalar.conf file is part of the mib2c source for parts of MIB implementations for some of the MIB implementations shipped with net-snmp.
You can make either a standalone application or a MIB implementation, not both.
> One major problem with standalone application(without implementing it
> as part of MIB OIDs) is traphandling. In snmptrapd.conf file we need
> to specify trap handlers for each trap generated like
> traphandle OID command
> I don not intend to use "default" option i.e., traphandle
> default command
Docoomentation good. You reed more, ugh.
Typically, the OID token will be the name (or numeric OID) of a
NOTIFICATION-TYPE object, and the specified program will be
invoked for notifications that match this OID exactly. However
this token also supports a simple form of wildcard suffixing.
By appending the character notification based within subtree
rooted at the specified OID. For example, an OID token of
.188.8.131.52.4.1* would match any enterprise specific notification
(including the specified OID itself). An OID token of
.184.108.40.206.4.1.* would would work in much the same way, but would
not match this exact OID - just notifications that lay strictly
below this root. Note that this syntax does not support full
regular expressions or wildcards - an OID token of the form
oid.*.subids is not valid.
So you can write a traphandler routine that processes all your enterprise traps and invoke it with snmptrapd. It will need to check which specific trap it's been sent each time it's been called.
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: