Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Nagios::Plugin::Getopt 0.27

    Download button

    No screenshots available
    Downloads: 1,061  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.0/5)
    16 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gavin Carr | More programs
    Perl Artistic License / FREE
    May 14th, 2008, 13:44 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    standardised argument | Nagios plugins | Perl module | Nagios::Plugin::Geto | standardised | argument

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM