+ fix plugin apc

This commit is contained in:
garnier-quentin 2016-01-15 16:40:45 +01:00
parent 11aec9d6e7
commit f5a81c4ef2
1 changed files with 9 additions and 5 deletions

View File

@ -215,8 +215,12 @@ sub manage_selection {
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_upsBasicBattery}, instance => '0'); my $result = $options{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_upsBasicBattery}, instance => '0');
my $result2 = $options{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_upsAdvBattery}, instance => '0'); my $result2 = $options{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_upsAdvBattery}, instance => '0');
$self->{global}->{$name} = $result->{$name} foreach my $name (keys %{$mapping}); foreach my $name (keys %{$mapping}) {
$self->{global}->{$name} = $result2->{$name} foreach my $name (keys %{$mapping2}); $self->{global}->{$name} = $result->{$name};
}
foreach my $name (keys %{$mapping2}) {
$self->{global}->{$name} = $result2->{$name};
}
} }
1; 1;