Douglas Christopher Wilson > Nagios-Plugin-OverHTTP-0.16 > Nagios::Plugin::OverHTTP::Formatter::Nagios::Version2

Download:
Nagios-Plugin-OverHTTP-0.16.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.16   Source  

NAME ^

Nagios::Plugin::OverHTTP::Formatter::Nagios::Version2 - Format output for Nagios version 2

VERSION ^

This documentation refers to Nagios::Plugin::OverHTTP::Formatter::Nagios::Version2 version 0.16

SYNOPSIS ^

  #TODO: Write this

DESCRIPTION ^

This formatter for Nagios::Plugin::OverHTTP will format the plugin output that corresponds to the plugin API in Nagios 2.

CONSTRUCTOR ^

This is fully object-oriented, and as such before any method can be used, the constructor needs to be called to create an object to work with.

new

This will construct a new plugin object.

new(%attributes)

%attributes is a HASH where the keys are attributes (specified in the "ATTRIBUTES" section).

new($attributes)

$attributes is a HASHREF where the keys are attributes (specified in the "ATTRIBUTES" section).

ATTRIBUTES ^

  # Set an attribute
  $object->attribute_name($new_value);

  # Get an attribute
  my $value = $object->attribute_name;

response

Required. This is the Nagios::Plugin::OverHTTP::Response object to format.

METHODS ^

exit_code

This will return the integer to use as the argument to exit.

stderr

This will return the string to print to stderr.

  print {*STDERR} $formatter->stderr;

stdout

This will return the string to print to stdout. The Nagios 2 plugin API supports only one line of output, and so only the first line of the message is given plus all the performance data on a single line.

  print {*STDOUT} $formatter->stdout;

DEPENDENCIES ^

This module is dependent on the following modules:

AUTHOR ^

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS ^

Please report any bugs or feature requests to bug-nagios-plugin-overhttp at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nagios-Plugin-OverHTTP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

LICENSE AND COPYRIGHT ^

Copyright 2010-2012 Douglas Christopher Wilson, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either:

syntax highlighting: