+ fix ml6000 plugin

This commit is contained in:
garnier-quentin 2016-01-15 14:32:44 +01:00
parent 8aea6cae96
commit 5947106031
3 changed files with 5 additions and 3 deletions

View File

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

View File

@ -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)) {

View File

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