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

Max perldork at webwizarddesign.com
Mon Jan 14 00:54:05 CET 2008


Hi,

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.

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 :).

Regards,
Max




More information about the Devel mailing list