check_junos: chassis_environment: Check thresholds against temp of components.
This commit is contained in:
parent
2614e18db7
commit
25d39b821b
|
@ -83,7 +83,8 @@ The following checks are available:
|
||||||
be checked as well.
|
be checked as well.
|
||||||
|
|
||||||
* chassis_environment: Check the status of verious system components
|
* 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
|
Warning and critical thresholds may be specified in the format documented at
|
||||||
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT.",
|
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT.",
|
||||||
|
@ -342,6 +343,12 @@ foreach my $check (@{$conf{'checks'}}) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$state = $plugin->check_threshold($temp);
|
||||||
|
if ($state != OK) {
|
||||||
|
$plugin->add_message($state, $class
|
||||||
|
. " $name: ${temp} degrees C");
|
||||||
|
}
|
||||||
|
|
||||||
my $label = "$name-temp";
|
my $label = "$name-temp";
|
||||||
$label =~ s/ /_/g;
|
$label =~ s/ /_/g;
|
||||||
$plugin->add_perfdata(
|
$plugin->add_perfdata(
|
||||||
|
|
Loading…
Reference in a new issue