Monitor a UPS with standard UPS-MIB

Monitoring UPS with the Standard UPS-MIB

Note: If you have a APC UPS, see How to: Monitoring APC UPS for more details

Any UPS which supports the UPS-MIB can be monitored with the OpenNMS SNMP-Monitor. The following configuration assume the UPS-MIB is supported.

upsBatteryStatus .1.3.6.1.2.1.33.1.2.1.0
upsSecondsOnBattery .1.3.6.1.2.1.33.1.2.2.0

Monitoring with Pollerd

To monitor this OIDs you have to create some monitors in $OPENNMS_HOME/etc/poller-configuration.xml

  <!-- UPS Standard MIBs -->
  <service name="UPS-Battery-Status" interval="300000" user-defined="false" status="on">
      <parameter key="retry" value="5"/>
      <parameter key="timeout" value="5950"/>
      <parameter key="port" value="161"/>
      <parameter key="oid" value=".1.3.6.1.2.1.33.1.2.1.0"/>
      <parameter key="operator" value="="/>
      <parameter key="operand" value="2"/>
      <parameter key="reason-template" value="UPS battery status is not normal. \
        The state should be normal(${operand}) the observed value is ${observedValue}. \
        Please check your UPS event log. Syntax: unknown(1), batteryNormal(2), batteryLow(3), \
        batteryDepleted(4)"/>
  </service>
  <service name="UPS-Seconds-on-battery" interval="300000" user-defined="false" status="on">
      <parameter key="retry" value="5"/>
      <parameter key="timeout" value="5950"/>
      <parameter key="port" value="161"/>
      <parameter key="oid" value=".1.3.6.1.2.1.33.1.2.2.0"/>
      <parameter key="operator" value="="/>
      <parameter key="operand" value="0"/>
      <parameter key="reason-template" value="UPS battery since ${observedValue} seconds on battery. \
        The value should be ${operand}. Please check your UPS event log. Syntax: Seconds on battery."/>
  </service>
  
  <monitor service="UPS-Battery-Status" class-name="org.opennms.netmgt.poller.monitors.SnmpMonitor"/>
  <monitor service="UPS-Seconds-on-battery" class-name="org.opennms.netmgt.poller.monitors.SnmpMonitor"/>

The monitored values are interpreted as follow:

upsBatteryStatus .1.3.6.1.2.1.33.1.2.1.0

  • unknown(1)
  • batteryNormal(2) - UP
  • battteryLow(3)
  • batteryDepleted(4)

upsSecondsOnBattery .1.3.6.1.2.1.33.1.2.2.0

  • seconds on battery should be 0 - UP
1 Like