From f57cb02165ee0d5d10a3fa621134e2ea19b3e8f1 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 17 Sep 2019 15:15:26 +0200 Subject: [PATCH] fix apc pdu --- hardware/pdu/apc/snmp/mode/load.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/pdu/apc/snmp/mode/load.pm b/hardware/pdu/apc/snmp/mode/load.pm index 24c0adcef..748765531 100644 --- a/hardware/pdu/apc/snmp/mode/load.pm +++ b/hardware/pdu/apc/snmp/mode/load.pm @@ -239,7 +239,7 @@ sub check_rpdu2 { my $snmp_result = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_rPDU2PhaseStatusEntry, end => $mapping_phase->{rPDU2PhaseStatusPower}->{oid} }, { oid => $oid_rPDU2BankStatusEntry, end => $mapping_bank->{rPDU2BankStatusCurrent}->{oid} }, - { oid => $oid_rPDU2DeviceStatusEntry, end => $mapping_bank->{rPDU2DeviceStatusPower}->{oid} }, + { oid => $oid_rPDU2DeviceStatusEntry, end => $mapping_device->{rPDU2DeviceStatusPower}->{oid} }, ]); foreach my $oid (keys %{$snmp_result->{$oid_rPDU2PhaseStatusEntry}}) { @@ -256,7 +256,7 @@ sub check_rpdu2 { } foreach my $oid (keys %{$snmp_result->{$oid_rPDU2BankStatusEntry}}) { - next if ($oid !~ /^$mapping_phase->{rPDU2BankStatusLoadState}->{oid}\.(.*)$/); + next if ($oid !~ /^$mapping_bank->{rPDU2BankStatusLoadState}->{oid}\.(.*)$/); my $instance = $1; my $result = $options{snmp}->map_instance(mapping => $mapping_bank, results => $snmp_result->{$oid_rPDU2BankStatusEntry}, instance => $instance);