[plug] ups driven automatic server shutdown
Adam Hewitt
ahewitt at theozhewitts.com
Mon Jun 30 08:50:54 WST 2008
On Fri, Jun 27, 2008 at 5:28 PM, Keith Bawden <keith at bawdo.com> wrote:
> 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)
Yeah I had been trying with both the numeric and named objects and neither
worked.
>
> 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 :-)
>
I haven't tested this yet, but I am led to believe that it will. I am also
very surprised that this seems to be the case. It seems totally pointless to
have an oid that only responds when its in an alarm state....totally counter
intuitive.
I will try the OID provided by the other responses and see how I go with
that.
Thanks to all that replied.
Adam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20080630/6ead08be/attachment.html>
More information about the plug
mailing list