MIB for Nagios

Subhendu Ghosh sghosh at sghosh.org
Fri Jun 13 16:52:46 CEST 2003


On Fri, 13 Jun 2003, Don Badrak wrote:

> Stanley, Subhendu,
> 
> On Fri, 13 Jun 2003, Stanley Hopcroft wrote:
> 
> > Dear Sir,
> >
> > I am writing to thank you for your lhetter and ask, please for the
> > benefit of the less literate SNMP folks around (such as YT),
> >
> > On Thu, Jun 12, 2003 at 01:32:07PM -0400, Subhendu Ghosh wrote:
> > > On Thu, 12 Jun 2003, Don Badrak wrote:
> > >
> > > > What I've been asked to do now is find a way to put Nagios notifications
> > > > into OVO.  I can do it through snmp traps.  My plan is to use a global
> > > > event handler in perl which uses the Net::SNMP modules to send an SNMP
> > > > trap.
> > >
> > >
> > > There is no official MIB for nagios. Rather than writing a complete mib
> > > consider just writing a trap definition.  VarBinds you want to pass should
> > > be the ones that are visible for event handlers (specially if you enable
> > > state tracking).
> > >
> >
> > would you care to elabourate (amplify) on your answer ?
> 
> Yeah, my sentiments exactly.  I partly understand, but this hit above my
> level of SNMP knowledge.

>From my perspective, a complete MIB would specify all the status info that 
is maintained by Nagios (some that are only visible from the cgis - such 
as next scheduled check)

A smaller subset would by what is maintained in the log files. Hence the 4 
tables that Don layed out below.

The traps are an even smaller subset, because the oids in traps don't have 
to refer to other parts of the mib (though most do). The traps would need 
oids to denote the following (at least):
host/service:
hostname:
servicename: (if service)
state:
timestamp:
plugin output:

> 
> > How would Open View understand the trap without a MIB ?
> 
> You have to have some kind of OID to pass it.  You can either make them up
> (not quite a good idea), or get an official Enterprise OID from IANA.
> That's why I asked about an official Nagios MIB.
> 
> > Will Open View accept _any_ trap and act on it - if configured to do so
> > ?
> 
> It seems so, from my testing.  I don't know OVO, but our people here
> configured it to accept the OID I sent, and mapped it to something.  They
> got the event.  I guess then one configures it to do something.


OV will understand any trap.  What needs to be done in OV is to map the 
trap to some action. (All events in OV are created via traps).

Yes - there is no Nagios enterprise tree registered with IANA, that could 
be done relatively easily.  It is not good practice to appropriate oid 
sub-trees ;)

<snip>

> 
> So, something like:
> 
> 	1.3.6.1.4.1.X (where X is a Nagios Enterprise number, or your own
> Enterprise number):
> 
> 	hostTable
> 	   hostEntry
>  	      hostName
> 	      hostAlias
> 	      hostAddress
> 	      hostParents
> 	      hostStateType		( SOFT | HARD )
> 	      hostState		 	( OK | WARNING | UP | DOWN | UNREACHABLE | RECOVERY )
> 
> 	serviceTable
> 	   serviceEntry
>               hostName
> 	      serviceDescription
> 	      serviceStateType		( SOFT | HARD )
> 	      serviceState		( OK | WARNING | CRITICAL | UNKNOWN )
> 
> 	commentTable
> 	   commentEntry
> 	      commentType		( HOST | SERVICE )
> 	      hostName
> 	      serviceDescription
> 	      entryTime
> 	      author
> 	      commentText
> 	      commentId
> 	      persistent		( NO | YES )
> 
> 	downtimeTable
> 	   downtimeEntry
> 	      downtimeType		( HOST | SERVICE )
> 	      hostName
> 	      serviceDescription
> 	      entryTime
> 	      author
> 	      commentText
> 	      startTime
> 	      endTime
> 	      fixed			( NO | YES )
> 	      duration
> 
> This is just a quick stab at it.  I'd have to read up some more on properly defining
> MIBS and such.
> 
> > Perhaps the general question is that if you have an 'Enterprise
> > Management System' such as Tivoli, Open View and friends, how does one
> > notify it - given that all of these things only understand _one_ IPC
> > method, namely SNMP traps, of a problem that Nagios detects ?
> 
> It looks like I'll be doing just this.  I know nearly nothing about the
> large-scale EMS stuff, but I could pass along config options for OVO and how to
> make Nagios integrate.  It does some things better than OVO (and it's easier
> to get working).
> 
> Don
> 

-- 




-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list