upsSecondsOnBattery

UPS-MIB · liebert variant · .1.3.6.1.2.1.33.1.2.2

Object

scalar secondsNonNegativeInteger
If the unit is on battery power, the elapsed time
since the UPS last switched to battery power, or the
time since the network management subsystem was last
restarted, whichever is less.  Zero shall be returned
if the unit is not on battery power.

Context

MIB
UPS-MIB
OID
.1.3.6.1.2.1.33.1.2.2
Type
scalar
Access
readonly
Status
current
Units
seconds
Parent
upsBattery
Groups
3

Scalars have one instance, identified by the .0 suffix.

Read the scalar instance
/usr/bin/snmpget -v2c -c '<community>' -Pud -Ir -OQUv -m 'UPS-MIB' -M '/opt/observium/mibs/liebert:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'udp:<hostname>:161' 'UPS-MIB::upsSecondsOnBattery.0'
More examples
Translate to a numeric OID
/usr/bin/snmptranslate -Pud -Ir -On -m 'UPS-MIB' -M '/opt/observium/mibs/liebert:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'UPS-MIB::upsSecondsOnBattery'

Syntax

Source
NonNegativeInteger
Base type
Integer32

Values & Constraints

Type Constraints
range: 0..2147483647

Conformance

Member of
Compliance refinements
The elapsed time since the UPS last switched to battery power,
or the time since the device was last restarted, whichever is
less. A value of 0 is returned if the attached devices are not
on battery power.