[Nagiosplug-devel] Incorrect MIB type?
Ton Voon
tonvoon at mac.com
Tue Mar 24 22:18:24 CET 2009
Hi!
I received this email offlist about the nagiosmib. However, I'm not
fluent with SNMP MIBs, so does anyone else have an opinion if this is
a safe change to make?
Ton
Begin forwarded message:
> From: Dirk Fieldhouse <dirk.fieldhouse at logica.com>
>
> As identified by Jan-Terje, the author of this message <URL: http://osdir.com/ml/network.nagios.plugins/2006-09/msg00011.html
> >, there is an inconsistency in the MIB module NAGIOS-NOTIFY-MIB.
> Unfortunately smilint, used for the package test, isn't able to
> detect this problem, because the inconsistent types are both integer
> types.
>
> At line 230
> nHostNotifyType NotifyType,
> nHostNotifyNum Integer32,
>
> At line 255
> nHostNotifyNum OBJECT-TYPE
> SYNTAX NotifyType
>
> Obviously NotifyType, an enumeration, is meant to be the syntax for
> nHostNotifyType and not for nHostNotifyNum.
>
> Also from the description for the nHostNotifyNum OBJECT-TYPE ...
>
> "This identifies the current notification number for the service or
> host.
> The notification number increases by one (1) each time a new
> notification
> is sent out for a host or service (except for
> acknowledgements). The
> notification number is reset to 0 when the host or service
> recovers
> (after the recovery notification has gone out).
> Acknowledgements do not
> cause the notification number to increase."
>
> ... it's clear that Integer32 (signed integer) isn't the right type
> for nHostNotifyNum, and it should be an unsigned type, Gauge32. Or
> perhaps Unsigned32, but Gauge32 has the benefit of specifying the
> behaviour in the vanishly unlikely case of overflowing 32 bits
> (doesn't wrap).
>
> For consistency nSvcNotifyNum needs the same change.
>
> I've attached a Unix diff file corresponding to these changes.
>
> Am I right in thinking that nothing in Nagios or nagiosplugins
> actually implements this MIB (say a trap-forwarder) and that it's
> purely to be used as a convention by event-handlers that send Nagios
> events as traps?
>
> Please feel free to redirect this to an appropriate discussion group.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20090324/b4fc355f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NAGIOS-NOTIFY-MIB.diff
Type: application/octet-stream
Size: 421 bytes
Desc: not available
URL: <http://nagios-plugins.org/archive/devel/attachments/20090324/b4fc355f/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20090324/b4fc355f/attachment-0001.html>
More information about the Devel
mailing list