NAME
Nagios::Plugin::OverHTTP - Nagios plugin to check over the HTTP protocol.
VERSION
Version 0.06
SYNOPSIS
my $plugin = Nagios::Plugin::OverHTTP->new(
url => 'https://myserver.net/nagios/check_some_service.cgi',
);
my $plugin = Nagios::Plugin::OverHTTP->new(
hostname => 'myserver.net',
path => '/nagios/check_some_service.cgi',
ssl => 1,
);
my $status = $plugin->status;
my $message = $plugin->message;
DESCRIPTION
This Nagios plugin provides a way to check services remotely over the HTTP protocol.
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.
hostname
This is the hostname of the remote server. This will automatically be populated if "url" is set.
path
This is the path to the remove Nagios plugin on the remote server. This will automatically be populated if "url" is set.
ssl
This is a boolean of weither or not to use SSL over HTTP (HTTPS). This defaults to false and will automatically be updated to true if a HTTPS URL is set to "url".
timeout
This is a positive integer for the timeout of the HTTP request. If set, this will override any timeout defined in the useragent for the duration of the request. The plugin will not permanently alter the timeout in the useragent. This defaults to not being set, and so the useragent's timeout is used.
url
This is the URL of the remote Nagios plugin to check. If not supplied, this will be constructed automatically from the "hostname" and "path" attributes.
useragent
This is the useragent to use when making requests. This defaults to LWP::Useragent with no options. Currently this must be an LWP::Useragent object.
new_with_options
This is identical to "new", except with the additional feature of reading the @ARGV
in the invoked scope (NOTE: a HASHREF cannot be provided as the constructing argument due to a bug in MooseX::Getopt). @ARGV
will be parsed for command-line arguments. The command-line can contain any variable that "new" can take. Arguments should be in the following format on the command line:
--url=http://example.net/check_something
--url http://example.net/check_something
# Note that quotes may be used, based on your shell environment
# For bools, like SSL, you would use:
--ssl # Enable SSL
--no-ssl # Disable SSL
METHODS
check
This will run the remote check. This is usually not needed, as attempting to access the message or status will result in the check being performed.
run
This will run the plugin in a standard way. The message will be printed to standard output and the status code will be returned. Good for doing the following:
my $plugin = Plugin::Nagios::OverHTTP->new_with_options;
exit $plugin->run;
DEPENDENCIES
Moose 0.74
AUTHOR
Douglas Christopher Wilson, <doug at somethingdoug.com>
BUGS AND LIMITATIONS
new_with_options
does not support a single HASHREF argument. Waiting on fix in https://rt.cpan.org/Ticket/Display.html?id=46200.
Please report any bugs or feature requests to bug-authen-cas-external at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Authen-CAS-External. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Authen::CAS::External
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Authen-CAS-External
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2009 Douglas Christopher Wilson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.