fix infoblox (#2358)

This commit is contained in:
qgarnier 2020-11-20 11:53:23 +01:00 committed by GitHub
parent 4d28aca671
commit 6c1683c977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 11 deletions

View File

@ -76,8 +76,8 @@ Can be: 'service'.
=item B<--filter>
Exclude some parts (comma seperated list)
Can also exclude specific instance: --filter=service,fan1
Filter component instances (syntax: component,regexp_filter). Component instances are excluded if matching regexp_filter.
E.g: --filter=service,fan1
=item B<--no-component>
@ -148,12 +148,18 @@ sub check {
next if ($self->check_filter(section => 'service', instance => $result->{ibNodeServiceName}));
$self->{components}->{service}->{total}++;
$self->{output}->output_add(long_msg => sprintf("service '%s' status is '%s' [instance = %s]",
$result->{ibNodeServiceName}, $result->{ibNodeServiceStatus}, $result->{ibNodeServiceName}));
my $exit = $self->get_severity(section => 'default', instance => $result->{ibNodeServiceName}, value => $result->{ibNodeServiceStatus});
$self->{output}->output_add(
long_msg => sprintf(
"service '%s' status is '%s' [instance = %s]",
$result->{ibNodeServiceName}, $result->{ibNodeServiceStatus}, $result->{ibNodeServiceName}
)
);
my $exit = $self->get_severity(section => 'default', label => 'service', instance => $result->{ibNodeServiceName}, value => $result->{ibNodeServiceStatus});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Service '%s' status is '%s'", $result->{ibNodeServiceName}, $result->{ibNodeServiceStatus}));
$self->{output}->output_add(
severity => $exit,
short_msg => sprintf("Service '%s' status is '%s'", $result->{ibNodeServiceName}, $result->{ibNodeServiceStatus})
);
}
}
}