Nagios::Plugin::Getopt

Nagios::Plugin::Getopt is a OO perl module providing standardised argument processing for Nagios plugins.
Download

Nagios::Plugin::Getopt Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gavin Carr
  • Publisher web site:
  • http://search.cpan.org/~gavinc/File-DirCompare-0.3/DirCompare.pm

Nagios::Plugin::Getopt Tags


Nagios::Plugin::Getopt Description

Nagios::Plugin::Getopt is a OO perl module providing standardised argument processing for Nagios plugins. Nagios::Plugin::Getopt is a OO perl module providing standardised argument processing for Nagios plugins.SYNOPSIS use Nagios::Plugin::Getopt; # Instantiate object (usage and version are mandatory) $ng = Nagios::Plugin::Getopt->new( usage => "Usage: %s -H -w -c ", version => '0.01', url => 'http://www.openfusion.com.au/labs/nagios/', blurb => 'This plugin tests various stuff.', ); # Add argument - named parameters (spec and help are mandatory) $ng->arg( spec => 'critical|c=s', help => qq(-c, --critical=INTEGERn Exit with CRITICAL status if fewer than INTEGER foobars are free), required => 1, default => 10, ); # Add argument - positional parameters - arg spec, help text, # default value, required? (first two mandatory) $ng->arg( 'warning|w=s', qq(-w, --warning=INTEGERn Exit with WARNING status if fewer than INTEGER foobars are free), 5, 1); # Parse arguments and process standard ones (e.g. usage, help, version) $ng->getopts; # Access arguments using named accessors or or via the generic get() print $ng->warning; print $ng->get('critical');Nagios::Plugin::Getopt is an OO perl module providing standardised and simplified argument processing for Nagios plugins. It implements a number of standard arguments itself (--help, --version, --usage, --timeout, --verbose, and their short form counterparts), produces standardised nagios plugin help output, and allows additional arguments to be easily defined. Requirements: · Perl


Nagios::Plugin::Getopt Related Software