[plug] ups driven automatic server shutdown

Keith Bawden keith at bawdo.com
Fri Jun 27 17:28:04 WST 2008


On Fri, Jun 27, 2008 at 16:06, Adam Hewitt <ahewitt at theozhewitts.com> wrote:
> upsAlarmOnBattery OBJECT-IDENTITY
>     STATUS    current
>     DESCRIPTION
>         "The UPS is drawing power from the batteries."
>     ::= {upsWellKnownAlarms 2}
>
> I can understand if there was an ACCESS option specified that was preventing
> me connecting, but there isn't.
>
> So, my question is this...Should I be able to retrieve an "ok" from this
> object when there is no alarm and a "critical" if there is? Can anyone who
> has an SNMP equiped UPS try retrieving this from their UPS to see if it
> works for you?

None of the UPS here at work have upsAlarmOnBattery, but that may not
mean anything. Do you know the numeric OID for it? If you cannot
access via the text based OID then try the numeric. For example:

: bawden-2 ~ $; /usr/bin/snmpwalk -c public -v 1 ups-1.my-work.com
.1.3.6.1.4.1.318.1.1.1.4.1.1
SNMPv2-SMI::enterprises.318.1.1.1.4.1.1.0 = INTEGER: 2

Also if you have a valid MIB file you will likely have better luck
(and more meaningfull output from snmpwalk) when searching for the
text version of the OID. For example check the difference of the when
grabbing the same object as above but this time with a mib file:

: bawden-2 ~ $; /usr/bin/snmpwalk  -m ./PowerNet-MIB -c public -v 1
ups-1.my-work.com .1.3.6.1.4.1.318.1.1.1.4.1.1
PowerNet-MIB::upsBasicOutputStatus.0 = INTEGER: onLine(2)

This now lets me do something like

: bawden-2 ~ $; /usr/bin/snmpwalk  -m ./PowerNet-MIB -c public -v 1
ups-1.my-work.com enterprises |=grep upsBasicOutputStatus
PowerNet-MIB::upsBasicOutputStatus.0 = INTEGER: onLine(2)

Last thing, can you access that OID when the UPS is actually running
on battery? I would be surprised if an object only becomes available
when in alarm... but then who knows :-)

Regards, Keith



More information about the plug mailing list