[hardware::pdu::apc::snmp::plugin] mode=outlet : missing rPDUOutletStatusLoad values
Hello,
Here the command line :
/usr/lib/centreon/plugins/centreon_pdu_apc_snmp.pl --plugin=hardware::pdu::apc::snmp::plugin --mode=outlet --hostname=10.X.X.X --snmp-version=2c --snmp-community=YYYY --snmp-timeout=30 --snmp-retries=1 --verbose --warning-current=0
Here the result : OK: All outlets are ok Outlet 'Outlet 1 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 10 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 11 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 12 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 13 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 14 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 15 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 16 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 17 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 18 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 19 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 2 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 20 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 21 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 22 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 23 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 24 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 3 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 4 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 5 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 6 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 7 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 8 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 9 bank 1' status : 'on' [phase: seqPhase1ToNeutral]
The plugin should take in account the "current" values for each outlet regarding the --warning-current and --critical-current option thresholds :
my $mapping = {
rPDUOutletStatusOutletName => { oid => '.1.3.6.1.4.1.318.1.1.12.3.5.1.1.2' },
rPDUOutletStatusOutletPhase => { oid => '.1.3.6.1.4.1.318.1.1.12.3.5.1.1.3', map => \%map_rpdu_phase },
rPDUOutletStatusOutletState => { oid => '.1.3.6.1.4.1.318.1.1.12.3.5.1.1.4', map => \%map_rpdu_status },
rPDUOutletStatusOutletBank => { oid => '.1.3.6.1.4.1.318.1.1.12.3.5.1.1.6' },
**rPDUOutletStatusLoad** => { oid => '.1.3.6.1.4.1.318.1.1.12.3.5.1.1.7' },
};
$self->{outlet}->{$name} = {
instance => $instance,
display => $name,
status => $result->{rPDUOutletStatusOutletState},
bank => $result->{rPDUOutletStatusOutletBank},
phase => $result->{rPDUOutletStatusOutletPhase},
current => $result->{**rPDUOutletStatusLoad**} / 10,
};
Here the MIB values returned with snmpwalk : PowerNet-MIB::rPDUOutletStatusLoad.1 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.2 = Gauge32: 11 PowerNet-MIB::rPDUOutletStatusLoad.3 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.4 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.5 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.6 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.7 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.8 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.9 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.10 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.11 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.12 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.13 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.14 = Gauge32: 3 PowerNet-MIB::rPDUOutletStatusLoad.15 = Gauge32: 4 PowerNet-MIB::rPDUOutletStatusLoad.16 = Gauge32: 6 PowerNet-MIB::rPDUOutletStatusLoad.17 = Gauge32: 6 PowerNet-MIB::rPDUOutletStatusLoad.18 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.19 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.20 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.21 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.22 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.23 = Gauge32: 0 PowerNet-MIB::rPDUOutletStatusLoad.24 = Gauge32: 0
Why these values are not returned by this mode from this plugin ?
Thanks.
Hello :)
Could you provide us with the command output with --debug option set ? (feel free to anonymize all fields that need it)?
Hello,
Here the result with --debug option :
.1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.1 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.2 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.3 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.4 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.5 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.6 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.7 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.8 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.9 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.10 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.11 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.5.12 = 1 .1.3.6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16 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.17 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.18 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.19 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.20 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.21 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.22 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.23 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.2.1.6.24 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.1 = Outlet 1 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.2 = Outlet 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.3 = Outlet 3 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.4 = Outlet 4 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.5 = Outlet 5 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.6 = Outlet 6 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.7 = Outlet 7 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.8 = Outlet 8 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.9 = Outlet 9 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.10 = Outlet 10 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.11 = Outlet 11 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.12 = Outlet 12 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.13 = Outlet 13 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.14 = Outlet 14 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.15 = Outlet 15 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.16 = Outlet 16 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.17 = Outlet 17 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.18 = Outlet 18 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.19 = Outlet 19 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.20 = Outlet 20 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.21 = Outlet 21 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.22 = Outlet 22 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.23 = Outlet 23 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.3.24 = Outlet 24 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.1 = 1 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.2 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.3 = 3 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.4 = 4 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.5 = 5 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.6 = 6 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.7 = 7 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.8 = 8 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.9 = 9 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.10 = 10 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.11 = 11 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.12 = 12 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.13 = 13 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.14 = 14 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.15 = 15 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.16 = 16 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.17 = 17 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.18 = 18 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.19 = 19 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.20 = 20 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.21 = 21 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.22 = 22 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.23 = 23 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.4.24 = 24 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.1 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.2 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.3 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.4 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.5 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.6 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.7 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.8 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.9 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.10 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.11 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.12 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.13 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.14 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.15 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.16 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.17 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.18 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.19 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.20 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.21 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.22 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.23 = 2 .1.3.6.1.4.1.318.1.1.26.9.2.3.1.5.24 = 2 Outlet 'Outlet 1 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 10 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 11 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 12 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 13 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 14 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 15 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 16 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 17 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 18 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 19 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 2 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 20 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 21 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 22 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 23 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 24 bank 2' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 3 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 4 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 5 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 6 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 7 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 8 bank 1' status : 'on' [phase: seqPhase1ToNeutral] Outlet 'Outlet 9 bank 1' status : 'on' [phase: seqPhase1ToNeutral]
Hello :)
It appears that since the OIDs of check-rpdu2 are accessible, they are given priority and do not report the current metric.
The check-rpdu function ends if the check-rpdu2 was able to find results : https://github.com/centreon/centreon-plugins/blob/a29bb5ad012874142ce6213b0eaa0b1778b4d76f/src/hardware/pdu/apc/snmp/mode/outlet.pm#L124
So in your case this are the mapping used :
rPDU2OutletSwitchedPropertiesPhaseLayout => { oid => '.1.3.6.1.4.1.318.1.1.26.9.2.2.1.5', map => $map_rpdu2_phase },
rPDU2OutletSwitchedPropertiesBank => { oid => '.1.3.6.1.4.1.318.1.1.26.9.2.2.1.6' },
rPDU2OutletSwitchedStatusName => { oid => '.1.3.6.1.4.1.318.1.1.26.9.2.3.1.3' },
rPDU2OutletSwitchedStatusState => { oid => '.1.3.6.1.4.1.318.1.1.26.9.2.3.1.5', map => $map_rpdu2_status }
These are the same OIDs than in you debug output.
Hello, Thank you for this answer. I understand why these values are not returned by the plugin. But i don't understand why is this ? The principle goal to use PDU is to to power off / on remotely and also knowing how much each physical server is power consummed. The values are available, can they be also exloited by the plugin ?
Hello :)
Unfortunately, I do not have the technical expertise to explain the difference between check-rpdu and check-rpdu2 mapping (perhaps you do?). As it stands, either you have the OIDs that allow you to reliably find the same information on the current metric in the check-rpdu2 mapping (if you can link a MIB it's the best case), or we can imagine to use an option to display them in check-rpdu2 if they are found in the OID of check-rpdu (this prevents situations where the OID is unavailable in equipment that involves check-rpdu2).
Thanks for this answer. I don't know difference beetween check-rpdu and check-rpdu2. The option to display them in check-rpdu2 if they are found seems to be the best way.
Hello :)
Okay, I'll see if we can easily offer that as an option. I'll keep you informed here.
Hi @ritouret, To be sure that we have all the data, we would like you to run
snmpwalk -ObentU -v 2c -c YYYY 10.X.X.X .1.3.6.1.4.1.318
We will then be able to precisely simlulate your device's responses. Thanks a lot!
Hi @omercier
Just sent by email.
Thanks