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.
- $single_check = new $JMX::Jmx4Perl::Nagios::SingleCheck($nagios_plugin,$check_config)
Construct a new single check from a given Nagios::Plugin object
$nagios_pluginand a parsed check configuration $check_config, which is a hash.
- $requests = $single_check->get_requests($jmx,$args)
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.
Extract JMX::Jmx4Perl::Response objects and add the deducted results to the nagios plugin (which was given at construction time).
$responsesis an arrayref to the returned responses,
$requestsis an arrayref to the original requests. Any response consumed from
$requestsshould 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.
$targetis an optional target configuration if the request was used in target proxy mode.
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/>.