From be17c4d58d99c3a5cf36a822b36e2c9ce0ced165 Mon Sep 17 00:00:00 2001 From: Simon Bomm Date: Wed, 14 Jan 2015 13:58:06 +0100 Subject: [PATCH] Fix Bugs #6070 & Bug #6068" --- centreon-plugins/network/checkpoint/mode/components/fan.pm | 2 +- centreon-plugins/network/checkpoint/mode/components/psu.pm | 2 +- .../network/checkpoint/mode/components/temperature.pm | 2 +- centreon-plugins/network/checkpoint/mode/components/voltage.pm | 2 +- centreon-plugins/network/checkpoint/mode/hastate.pm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/centreon-plugins/network/checkpoint/mode/components/fan.pm b/centreon-plugins/network/checkpoint/mode/components/fan.pm index d8e9252a6..140947071 100644 --- a/centreon-plugins/network/checkpoint/mode/components/fan.pm +++ b/centreon-plugins/network/checkpoint/mode/components/fan.pm @@ -60,7 +60,7 @@ sub check { return if (scalar(keys %$result) <= 0); foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) { - next if ($key !~ /^$oid_fanSpeedSensorStatus\.(\d+)$/); + next if ($key !~ /^$oid_fanSpeedSensorStatus\.(\d+).(\d+)$/); my $instance = $1; next if ($self->check_exclude(section => 'fan', instance => $instance)); diff --git a/centreon-plugins/network/checkpoint/mode/components/psu.pm b/centreon-plugins/network/checkpoint/mode/components/psu.pm index ed1217558..3e1ca50bc 100644 --- a/centreon-plugins/network/checkpoint/mode/components/psu.pm +++ b/centreon-plugins/network/checkpoint/mode/components/psu.pm @@ -51,7 +51,7 @@ sub check { return if (scalar(keys %$result) <= 0); foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) { - $key =~ /^$oid_powerSupplyStatus\.(\d+)$/; + $key =~ /^$oid_powerSupplyStatus\.(\d+).(\d+)$/; my $instance = $1; next if ($self->check_exclude(section => 'psu', instance => $instance)); diff --git a/centreon-plugins/network/checkpoint/mode/components/temperature.pm b/centreon-plugins/network/checkpoint/mode/components/temperature.pm index ab777086d..bb9b8231f 100644 --- a/centreon-plugins/network/checkpoint/mode/components/temperature.pm +++ b/centreon-plugins/network/checkpoint/mode/components/temperature.pm @@ -61,7 +61,7 @@ sub check { return if (scalar(keys %$result) <= 0); foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) { - next if ($key !~ /^$oid_tempertureSensorValue\.(\d+)$/); + next if ($key !~ /^$oid_tempertureSensorValue\.(\d+).(\d+)$/); my $instance = $1; next if ($self->check_exclude(section => 'temperature', instance => $instance)); diff --git a/centreon-plugins/network/checkpoint/mode/components/voltage.pm b/centreon-plugins/network/checkpoint/mode/components/voltage.pm index 3476701b5..0b72c8a03 100644 --- a/centreon-plugins/network/checkpoint/mode/components/voltage.pm +++ b/centreon-plugins/network/checkpoint/mode/components/voltage.pm @@ -60,7 +60,7 @@ sub check { return if (scalar(keys %$result) <= 0); foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) { - next if ($key !~ /^$oid_voltageSensorStatus\.(\d+)$/); + next if ($key !~ /^$oid_voltageSensorStatus\.(\d+).(\d+)$/); my $instance = $1; next if ($self->check_exclude(section => 'voltage', instance => $instance)); diff --git a/centreon-plugins/network/checkpoint/mode/hastate.pm b/centreon-plugins/network/checkpoint/mode/hastate.pm index 99e39c918..6f41eae24 100644 --- a/centreon-plugins/network/checkpoint/mode/hastate.pm +++ b/centreon-plugins/network/checkpoint/mode/hastate.pm @@ -67,7 +67,7 @@ sub run { my $oid_haInstalled = '.1.3.6.1.4.1.2620.1.5.2.0'; my $oid_haState = '.1.3.6.1.4.1.2620.1.5.6.0'; - my $oid_haStatCode = '.1.3.6.1.4.1.2620.1.6.7.2.2.0'; + my $oid_haStatCode = '.1.3.6.1.4.1.2620.1.5.101'; my $oid_haStarted = '.1.3.6.1.4.1.2620.1.5.5.0'; my $result = $self->{snmp}->get_leef(oids => [$oid_haInstalled, $oid_haState, $oid_haStatCode, $oid_haStarted], nothing_quit => 1);