From 5947106031b6cbdbb6d92ae97dce8e1ab81b3df7 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 15 Jan 2016 14:32:44 +0100 Subject: [PATCH] + fix ml6000 plugin --- centreon/common/adic/tape/snmp/mode/components/global.pm | 2 +- .../common/adic/tape/snmp/mode/components/physicaldrive.pm | 4 +++- centreon/common/adic/tape/snmp/mode/components/subsystem.pm | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/centreon/common/adic/tape/snmp/mode/components/global.pm b/centreon/common/adic/tape/snmp/mode/components/global.pm index 009adf378..e12a12ba1 100644 --- a/centreon/common/adic/tape/snmp/mode/components/global.pm +++ b/centreon/common/adic/tape/snmp/mode/components/global.pm @@ -59,7 +59,7 @@ sub check { } 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].", $result->{libraryGlobalStatus}, $instance diff --git a/centreon/common/adic/tape/snmp/mode/components/physicaldrive.pm b/centreon/common/adic/tape/snmp/mode/components/physicaldrive.pm index 3fea6962c..ae1b78b8b 100644 --- a/centreon/common/adic/tape/snmp/mode/components/physicaldrive.pm +++ b/centreon/common/adic/tape/snmp/mode/components/physicaldrive.pm @@ -22,6 +22,7 @@ package centreon::common::adic::tape::snmp::mode::components::physicaldrive; use strict; use warnings; +use centreon::plugins::misc; my %map_status = ( 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].", $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}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { diff --git a/centreon/common/adic/tape/snmp/mode/components/subsystem.pm b/centreon/common/adic/tape/snmp/mode/components/subsystem.pm index 1e7c634d3..d9cb54327 100644 --- a/centreon/common/adic/tape/snmp/mode/components/subsystem.pm +++ b/centreon/common/adic/tape/snmp/mode/components/subsystem.pm @@ -66,7 +66,7 @@ sub check { } 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].", $mapping->{$name}->{label}, $result->{$name},