[Nagiosplug-devel] Nagios::Plugin::SNMP

Gavin Carr gavin at openfusion.com.au
Mon Jan 14 23:38:57 CET 2008


Hi Max,

On Sun, Jan 13, 2008 at 06:54:05PM -0500, Max wrote:
> I do a lot of custom SNMP checks that don't have existing plugins;
> most of the plugin work I do is in perl.
> 
> I have created a sub-class of Nagios::Plugin for my use for this, it
> uses Net::SNMP for its' SNMP requests, and includes convenience
> functionality:
> * Automatically adds SNMP-related arguments to Nagios::Plugin
>   * --snmp-version
>   * --snmp-timeout
>   * --snmp-debug - turns on debugging in Net::SNMP
>   * --auth-username
>   * --auth-password
>   * --auth-protocol
>   * --rocommunity
>   * --hostname
>   * --port
>   * Adds --warning and --critical to args as well
> * Validates SNMP arguments by overloading getopts to include a validation
>    method to make sure the SNMP arguments passed in are valid for the
>    version of SNMP selected.
> * Appends an USAGE string to the 'usage' parameter passed in via new() in
>   Nagios::Plugin
> * Includes an easy to use get() and walk() routine.
> * Includes connect and disconnect routines; connect can be called explicitly
>   or will be called implicitly when get() or walk() is called.
> 
> I thought using the namespace Nagios::Plugin::SNMP would be
> appropriate since it does subclass Nagios::Plugin, but figured I
> better write you, the developers and maintainers of the module :), to
> see if that is ok with you; I would like to publish this module on
> CPAN when it is ready for prime time.

Looks good to me - seems to fit in pretty well with what we're trying to do
with N::P, and seems nicely generic. Thanks for asking.

> If you are not ok with the namespace i have chosen, that is ok too :)
> .. please let me know.  Will publish the code online once I have
> stable code, just figured it would be better to ask permission for the
> namespace right away so that if you are not ok with this I can choose
> another before I set up project space.
> 
> Regardless of whether you allow me to use this name space or not I
> will give credits to you in my module docs for your module along with
> links to the SF.net project page :).

If you could let us know if you set up a webpage or version control tree 
or anything for it what would be great.

Cheers,
Gavin





More information about the Devel mailing list