Fix #802
This commit is contained in:
parent
a85703e610
commit
b57ca69733
|
@ -52,6 +52,7 @@ sub check {
|
|||
return if (!defined($self->{results}->{$mapping->{systemHealthStat}->{oid}}) || scalar(keys %{$self->{results}->{$mapping->{systemHealthStat}->{oid}}}) <= 0);
|
||||
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$mapping->{systemHealthStat}->{oid}}, instance => '0');
|
||||
$self->{components}->{global}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("system health status is '%s'",
|
||||
$result->{systemHealthStat}));
|
||||
|
|
|
@ -62,8 +62,8 @@ sub check {
|
|||
if (defined($result->{voltReading})) {
|
||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'voltage', instance => $instance, value => $result->{voltReading});
|
||||
if ($checked == 0) {
|
||||
my $warn_th = $result->{voltNonCritLimitLow} . ':' . $result->{voltNonCritLimitHigh};
|
||||
my $crit_th = $result->{voltCritLimitLow} . ':' . $result->{voltCritLimitHigh};
|
||||
my $warn_th = $result->{voltNonCritLimitLow} . ':' . ($result->{voltNonCritLimitHigh} > 0 ? $result->{voltNonCritLimitHigh} : '');
|
||||
my $crit_th = $result->{voltCritLimitLow} . ':' . ($result->{voltCritLimitHigh} > 0 ? $result->{voltCritLimitHigh} : '');
|
||||
$self->{perfdata}->threshold_validate(label => 'warning-voltage-instance-' . $instance, value => $warn_th);
|
||||
$self->{perfdata}->threshold_validate(label => 'critical-voltage-instance-' . $instance, value => $crit_th);
|
||||
$exit = $self->{perfdata}->threshold_check(
|
||||
|
|
Loading…
Reference in New Issue