mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 14:44:43 +02:00
enh(hp/ilo/restapi): hardware - add default warning temperature threshold (#3014)
This commit is contained in:
parent
66cf4671a7
commit
5edae35ad8
@ -78,6 +78,7 @@ sub check {
|
|||||||
my $crit_th = defined($temp->{UpperThresholdFatal}) ? ':' . $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);
|
||||||
|
$warn = $self->{perfdata}->get_perfdata_for_output(label => 'warning-temperature-instance-' . $instance);
|
||||||
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
|
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ sub check {
|
|||||||
instances => [$chassis_name, $temp_name],
|
instances => [$chassis_name, $temp_name],
|
||||||
value => $temp->{ReadingCelsius},
|
value => $temp->{ReadingCelsius},
|
||||||
warning => $warn,
|
warning => $warn,
|
||||||
critical => $crit,
|
critical => $crit
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,11 @@ sub new {
|
|||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$self->{version} = '0.1';
|
$self->{version} = '0.1';
|
||||||
%{ $self->{modes} } = (
|
$self->{modes} = {
|
||||||
'hardware' => 'centreon::common::redfish::restapi::mode::hardware',
|
'hardware' => 'centreon::common::redfish::restapi::mode::hardware'
|
||||||
);
|
};
|
||||||
|
|
||||||
$self->{custom_modes}{api} = 'hardware::server::hp::ilo::restapi::custom::api';
|
$self->{custom_modes}->{api} = 'hardware::server::hp::ilo::restapi::custom::api';
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user