+ Fix #245
This commit is contained in:
parent
dc2c461076
commit
f369f6c362
|
@ -103,7 +103,7 @@ sub check_fan_entity {
|
|||
my $exit = $self->get_severity(section => 'fan', value => $result->{cefcFanTrayOperStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' status is %s.", $fan_descr, $result->{cefcFanTrayOperStatus}));
|
||||
short_msg => sprintf("Fan '%s/%s' status is %s", $fan_descr, $instance, $result->{cefcFanTrayOperStatus}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,8 @@ sub check {
|
|||
my $exit = $self->get_severity(section => 'module', value => $result->{cefcModuleOperStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Module '%s' status is %s", $module_descr, $result->{cefcModuleOperStatus}));
|
||||
short_msg => sprintf("Module '%s/%s' status is %s", $module_descr,
|
||||
$instance, $result->{cefcModuleOperStatus}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,8 @@ sub check {
|
|||
my $exit = $self->get_severity(section => 'physical', value => $result->{cefcPhysicalStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Physical '%s' status is %s", $physical_descr, $result->{cefcPhysicalStatus}));
|
||||
short_msg => sprintf("Physical '%s/%s' status is %s", $physical_descr,
|
||||
$instance, $result->{cefcPhysicalStatus}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ sub check_psu_entity {
|
|||
my $exit = $self->get_severity(section => 'psu', value => $result->{cefcFRUPowerOperStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Power supply '%s' status is %s.", $psu_descr, $result->{cefcFRUPowerOperStatus}));
|
||||
short_msg => sprintf("Power supply '%s/%s' status is %s", $psu_descr, $instance, $result->{cefcFRUPowerOperStatus}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,8 +202,8 @@ sub check {
|
|||
my $exit = $self->get_severity(section => $result->{entSensorType}, label => 'sensor', value => $result->{entSensorStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Sensor '%s' status is '%s'",
|
||||
$sensor_descr, $result->{entSensorStatus}));
|
||||
short_msg => sprintf("Sensor '%s/%s' status is '%s'",
|
||||
$sensor_descr, $instance, $result->{entSensorStatus}));
|
||||
}
|
||||
|
||||
next if (!defined($result->{entSensorValue}) || $result->{entSensorValue} !~ /[0-9]/);
|
||||
|
@ -222,7 +222,7 @@ sub check {
|
|||
}
|
||||
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Sensor '%s' is %s %s", $sensor_descr, $result->{entSensorValue}, $perfdata_unit{$result->{entSensorType}}));
|
||||
short_msg => sprintf("Sensor '%s/%s' is %s %s", $sensor_descr, $instance, $result->{entSensorValue}, $perfdata_unit{$result->{entSensorType}}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => $component . '_' . $sensor_descr, unit => $perfdata_unit{$result->{entSensorType}},
|
||||
value => $result->{entSensorValue},
|
||||
|
|
Loading…
Reference in New Issue