From a58c4597b7895c42ebe744ca9951e14ad9c3cf5e Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Mon, 16 Feb 2015 16:34:28 +0100 Subject: [PATCH] Fix hp proliant mode --- hardware/server/hp/proliant/snmp/mode/components/daacc.pm | 4 ++-- hardware/server/hp/proliant/snmp/mode/components/lnic.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/server/hp/proliant/snmp/mode/components/daacc.pm b/hardware/server/hp/proliant/snmp/mode/components/daacc.pm index 42fa3f948..ef46b4dd1 100644 --- a/hardware/server/hp/proliant/snmp/mode/components/daacc.pm +++ b/hardware/server/hp/proliant/snmp/mode/components/daacc.pm @@ -108,11 +108,11 @@ sub check { short_msg => sprintf("da controller accelerator '%s' is %s", $instance, $result3->{cpqDaAccelCondition})); } - $exit = $self->get_severity(section => 'daaccbattery', value => $result3->{cpqDaAccelBattery}); + $exit = $self->get_severity(section => 'daaccbattery', value => $result2->{cpqDaAccelBattery}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("da controller accelerator '%s' battery is %s", - $instance, $result3->{cpqDaAccelBattery})); + $instance, $result2->{cpqDaAccelBattery})); } } } diff --git a/hardware/server/hp/proliant/snmp/mode/components/lnic.pm b/hardware/server/hp/proliant/snmp/mode/components/lnic.pm index 35cb57b1f..509d93b90 100644 --- a/hardware/server/hp/proliant/snmp/mode/components/lnic.pm +++ b/hardware/server/hp/proliant/snmp/mode/components/lnic.pm @@ -90,13 +90,13 @@ sub check { my $instance = $1; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_cpqNicIfLogMapDescription}, instance => $instance); my $result2 = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_cpqNicIfLogMapAdapterCount}, instance => $instance); - my $result3 = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_cpqNicIfLogMapEntry}, instance => $instance); + my $result3 = $self->{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{$oid_cpqNicIfLogMapEntry}, instance => $instance); next if ($self->check_exclude(section => 'lnic', instance => $instance)); $self->{components}->{lnic}->{total}++; $self->{output}->output_add(long_msg => printf("logical nic '%s' [adapter count: %s, description: %s, status: %s] condition is %s.", - $instance, $result->{cpqNicIfLogMapAdapterCount}, centreon::plugins::misc::trim($result->{cpqNicIfLogMapDescription}), + $instance, $result2->{cpqNicIfLogMapAdapterCount}, centreon::plugins::misc::trim($result->{cpqNicIfLogMapDescription}), $result3->{cpqNicIfLogMapStatus}, $result3->{cpqNicIfLogMapCondition})); my $exit = $self->get_severity(section => 'lnic', value => $result3->{cpqNicIfLogMapCondition});