NAME
JMX::Jmx4Perl::Nagios::SingleCheck - A single nagios check
This is an package used internally by JMX::Jmx4Perl::Nagios::CheckJmx4Perl. It encapsulates the configuration for single checks, which can be combined to a bulk JMX-Request so only a single server turnaround is used to obtain multiple checks results at once.
METHODS
- $single_check = new $JMX::Jmx4Perl::Nagios::SingleCheck($nagios_plugin,$check_config)
-
Construct a new single check from a given Nagios::Plugin object
$nagios_plugin
and a parsed check configuration $check_config, which is a hash. - $requests = $single_check->get_requests($jmx,$args)
-
Called to obtain an arrayref of JMX::Jmx4Perl::Request objects which should be send to the server agent.
$jmx
ist the JMX::Jmx4Perl agent,$args
are additonal arguments used for exec-operations,Multiple request object are returned e.g. if a relative check has to be performed in order to get the base value as well.
The returned array can contain coderefs which should be executed directly and its return value should be used in order to perfoorm the check.
- $single_check->exract_responses($responses,$requests,$target)
-
Extract JMX::Jmx4Perl::Response objects and add the deducted results to the nagios plugin (which was given at construction time).
$responses
is an arrayref to the returned responses,$requests
is an arrayref to the original requests. Any response consumed from$requests
should be removed from the array, as well as the corresponding request. The requests/responses for this single request are always a the beginning of the arrays.$target
is an optional target configuration if the request was used in target proxy mode.
LICENSE
This file is part of jmx4perl.
Jmx4perl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
jmx4perl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.
AUTHOR
roland@cpan.org