Commit 81f80371 authored by Mike Hibler's avatar Mike Hibler

Modify last fix. We need to check two OIDs to cover all known APC models.

parent 154d4c9a
......@@ -121,17 +121,23 @@ sub status {
# come first, we use them. We grab the number of phases supported,
# then use that as a limit on how many status load values we retrieve.
# The OID to retrieve the phases is: ".";
# The OID to retrieve the phases is: "."
# for more recent units, or: "."
# for older ones;
# the load status table OID is: ".".
my $phases;
$phases = $self->{SESS}->get([["rPDUIdentDeviceNumPhases",0]]);
if (!$phases) {
# not all models support this MIB
print STDERR "Query phase: IdentDeviceNumPhases failed\n"
if $self->{DEBUG};
return 0;
# not all models support this MIB, try another
$phases = $self->{SESS}->get([["rPDULoadDevNumPhases",0]]);
if (!$phases) {
# some don't support either, bail.
print STDERR "Query phase: IdentDeviceNumPhases/LoadDevNumPhases failed\n"
if $self->{DEBUG};
return 0;
print "Okay.\nPhase report was '$phases'\n" if $self->{DEBUG};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment