+ Fix bug apc ats (#1127)

This commit is contained in:
garnier-quentin 2018-12-20 14:37:17 +01:00
parent b89cda54f5
commit c039f96059
1 changed files with 2 additions and 1 deletions

View File

@ -68,8 +68,9 @@ sub check {
$self->{components}->{entity}->{total}++;
$self->{output}->output_add(long_msg => sprintf("entity '%s' status is '%s' [instance = %s]",
$mapping->{$_}->{label}, $result->{$_}, $mapping->{$_}->{label}));
$mapping->{$_}->{label}, defined($result->{$_}) ? $result->{$_} : 'n/a', $mapping->{$_}->{label}));
next if (!defined($result->{$_}));
my $exit = $self->get_severity(section => 'entity', instance => $mapping->{$_}->{label}, value => $result->{$_});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,