check_junos: chassis_environment: Check thresholds against temp of components.

This commit is contained in:
Sebastian Harl 2012-01-02 14:20:50 +01:00
parent 2614e18db7
commit 25d39b821b

View file

@ -83,7 +83,8 @@ The following checks are available:
be checked as well.
* chassis_environment: Check the status of verious system components
(as provided by 'show chassis environment').
(as provided by 'show chassis environment'). If specified, the thresholds
will be checked against the temperature of the components.
Warning and critical thresholds may be specified in the format documented at
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT.",
@ -342,6 +343,12 @@ foreach my $check (@{$conf{'checks'}}) {
next;
}
$state = $plugin->check_threshold($temp);
if ($state != OK) {
$plugin->add_message($state, $class
. " $name: ${temp} degrees C");
}
my $label = "$name-temp";
$label =~ s/ /_/g;
$plugin->add_perfdata(