Re: Monitoring UPS battery with SNMP
On Wed, 05 May 2010 23:28:34 -0300, Daniel Bareiro wrote:
> Recently we acquired a UPS Liebert (Emerson) PS1440RT2-230 where I was
> investigating on the existence of some client for Debian GNU/Linux, but
> the unique one that I could find provided by Emerson requires of a X
> server.
You also have NUT (Network UPS Tools). Maybe your UPS unit works with
this application :-?
> Since this host is a server, it would not be serving a graphical client.
> Due to this, I'm working in script that can get the state of the UPS
> battery using SNMP with snmpwalk.
Is a java app? If so, some manufacturers alongside the java based
software, provides ncurses interface for UPS monitoring.
> From the web interface I could obtain in "Support-> Summary -> SNMP
> Capabilities -> Parameters" the OIDs corresponding to the estimated
> minutes remaining and the estimated charge remaining and both seem to
> work:
>
> Estimated minutes remaining:
>
> beta-new:~# snmpwalk 10.0.0.153 -c community -v1 1.3.6.1.2.1.33.1.2.3.0
> SNMPv2-SMI::mib-2.33.1.2.3.0 = INTEGER: 60
>
> Estimated charge remaining:
>
> beta-new:~# snmpwalk 10.0.0.153 -c community -v1 1.3.6.1.2.1.33.1.2.4.0
> SNMPv2-SMI::mib-2.33.1.2.4.0 = INTEGER: 100
>
>
> The problem with this is that also I would need to know some parameter
> that it indicates if the UPS is working on battery mode, because if I
> also do not verify this, after the restitution of the electrical
> provision, the host could doing a shutdown if the script makes the
> verification of battery autonomy and this not yet exceeded the
> determined limit.
>
> Reading the RFC 1628 [1] (UPS Management Information Base), it could be
> done with upsSecondsOnBattery, although I don't see listing it in the
> OIDs of the web interface. Could also be done this with upsOutputSource
> (upsOutputSource not equal to 3)?
Liebert provides all the MIBs files for their UPS systems:
http://www.liebert.com/servicesupport_pages/servicesupport.aspx?x=intellislot_mibs
As per the doc, that value indicates:
***
upsOutputSource OBJECT-TYPE
SYNTAX INTEGER {
other(1),
none(2),
normal(3),
bypass(4),
battery(5),
booster(6),
reducer(7)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The present source of output power. The enumeration
none(2) indicates that there is no source of output
power (and therefore no output power), for example,
the system has opened the output breaker."
::= { upsOutput 1 }
***
So a value of "3" indicates the units is providing power from AC. But
note these are "output" values (from what source the UPS is providing
power to devices) not "input" values (from what source the UPS unit is
being powered).
> Perhaps although already there is some client (Debian package) which
> contemplates all these considerations and I'm trying to re-invent the
> wheel :-)
It's hard to get a pre-made aplication for this as many manufacturers use
their own specs (without providing papers) for their UPS units/cables and
only provide a closed application that may lack from several features.
Next time, before buying a UPS, check whether provides linux support "out-
of-the-box" as many APC-MGE UPS do >:-)
Greetings,
--
Camaleón
Reply to: