+ fix ml6000 plugin
This commit is contained in:
parent
8aea6cae96
commit
5947106031
|
@ -59,7 +59,7 @@ sub check {
|
||||||
}
|
}
|
||||||
|
|
||||||
return if ($self->check_filter(section => 'global', instance => $instance));
|
return if ($self->check_filter(section => 'global', instance => $instance));
|
||||||
$self->{components}->{physicaldrive}->{total}++;
|
$self->{components}->{global}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("library global status is %s [instance: %s].",
|
$self->{output}->output_add(long_msg => sprintf("library global status is %s [instance: %s].",
|
||||||
$result->{libraryGlobalStatus}, $instance
|
$result->{libraryGlobalStatus}, $instance
|
||||||
|
|
|
@ -22,6 +22,7 @@ package centreon::common::adic::tape::snmp::mode::components::physicaldrive;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use centreon::plugins::misc;
|
||||||
|
|
||||||
my %map_status = (
|
my %map_status = (
|
||||||
1 => 'good',
|
1 => 'good',
|
||||||
|
@ -64,7 +65,8 @@ sub check {
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("physical drive '%s' status is %s [instance: %s, model: %s, serial: %s].",
|
$self->{output}->output_add(long_msg => sprintf("physical drive '%s' status is %s [instance: %s, model: %s, serial: %s].",
|
||||||
$instance, $result->{phDriveRasStatus},
|
$instance, $result->{phDriveRasStatus},
|
||||||
$instance, $result->{phDriveModel}, $result->{phDriveSerialNumber}
|
$instance, centreon::plugins::misc::trim($result->{phDriveModel}),
|
||||||
|
centreon::plugins::misc::trim($result->{phDriveSerialNumber})
|
||||||
));
|
));
|
||||||
my $exit = $self->get_severity(section => 'physicaldrive', label => 'default', value => $result->{phDriveRasStatus});
|
my $exit = $self->get_severity(section => 'physicaldrive', label => 'default', value => $result->{phDriveRasStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ sub check {
|
||||||
}
|
}
|
||||||
|
|
||||||
next if ($self->check_filter(section => 'subsystem', instance => $mapping->{$name}->{instance}));
|
next if ($self->check_filter(section => 'subsystem', instance => $mapping->{$name}->{instance}));
|
||||||
$self->{components}->{physicaldrive}->{total}++;
|
$self->{components}->{subsystem}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("%s status is %s [instance: %s].",
|
$self->{output}->output_add(long_msg => sprintf("%s status is %s [instance: %s].",
|
||||||
$mapping->{$name}->{label}, $result->{$name},
|
$mapping->{$name}->{label}, $result->{$name},
|
||||||
|
|
Loading…
Reference in New Issue