This commit is contained in:
garnier-quentin 2016-02-10 10:58:48 +01:00
parent dc2c461076
commit f369f6c362
5 changed files with 9 additions and 7 deletions

View File

@ -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}));
}
}
}

View File

@ -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}));
}
}
}

View File

@ -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}));
}
}
}

View File

@ -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}));
}
}
}

View File

@ -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},