mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 23:24:27 +02:00
fix ilo 5 plugin
This commit is contained in:
parent
8d3b0c5ba3
commit
4b260ea377
@ -50,7 +50,7 @@ sub check {
|
|||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
"temperature '%s/%s' status is '%s' [instance: %s, state: %s, value: %s]",
|
"temperature '%s/%s' status is '%s' [instance: %s, state: %s, value: %s]",
|
||||||
$chassis_name, $temp_name, $temp->{Status}->{Health}, $instance, $temp->{Status}->{State},
|
$chassis_name, $temp_name, $temp->{Status}->{Health}, $instance, $temp->{Status}->{State},
|
||||||
$temp->{ReadingCelsius},
|
$temp->{ReadingCelsius}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -70,10 +70,12 @@ sub check {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next if (!defined($temp->{ReadingCelsius}) || $temp->{ReadingCelsius} == 0);
|
||||||
|
|
||||||
my ($exit2, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $temp->{ReadingCelsius});
|
my ($exit2, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $temp->{ReadingCelsius});
|
||||||
if ($checked == 0) {
|
if ($checked == 0) {
|
||||||
my $warn_th = ':' . $temp->{UpperThresholdCritical};
|
my $warn_th = defined($temp->{UpperThresholdCritical}) ? ':' . $temp->{UpperThresholdCritical} : '';
|
||||||
my $crit_th = ':' . $temp->{UpperThresholdFatal};
|
my $crit_th = defined($temp->{UpperThresholdFatal}) ? ':' . $temp->{UpperThresholdFatal} : '';
|
||||||
$self->{perfdata}->threshold_validate(label => 'warning-temperature-instance-' . $instance, value => $warn_th);
|
$self->{perfdata}->threshold_validate(label => 'warning-temperature-instance-' . $instance, value => $warn_th);
|
||||||
$self->{perfdata}->threshold_validate(label => 'critical-temperature-instance-' . $instance, value => $crit_th);
|
$self->{perfdata}->threshold_validate(label => 'critical-temperature-instance-' . $instance, value => $crit_th);
|
||||||
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
|
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user