1. Home
  2. Docs
  3. Technical Information
  4. UPS Monitoring

UPS Monitoring

OPMONis is monitoring the UPS by polling the status of the UPS on a regular base. The status of each added UPS is polled every 20 seconds and compared to the last polled status. If there is a change, then this is saved as an event. (E.g. a change from charging to discharging). If this event is recognized as the status “discharging” and the set threshold values are met, then OPMONis will trigger the Shutdown of the systems (if OPMONis is in automatic mode)

Monitoring by WMI

Most UPSs that are connected by cable (USB or serial) will be recognized automatically as a battery by Windows (sometimes the drivers have to be added or removed, especially using APC). Here, the actual state of the UPS can be polled via “WMI” (Windows Management Instrumentation). With this information OPMONis is gathering the information if the state of the UPS is charging or discharging, as well as the remaining time in minutes and the charging level as a percentage.

Monitoring by SNMP (v1)

Network UPSs are monitored by OPMONis via SNMPv1 (Simple Network Management Protocol). With this protocol it is possible to poll the actual state of the UPS by network (GET data package).

To be able to poll a data value from an UPS, OPMONis needs to know two information:

  1. Community name:
    This is used to display access permissions. Usually, for read-only access the used community name is “public”.
  2. Object Identifier (OID)
    The OID is an explicit identifier. The OID is defined in dot notation (e.g. 1.2.6.1.2.33.1.2.3.0 for the remaining time in minutes)

The general difficulty about SNMP is to find the matching OID value. For a representation that also can be read by humans usually a notation is used that is called “Management Information Base” (MIB) is used. For UPSs there exists a standard MIB which was defined in the “RFC 1628”. Each company can choose to use an own definition. These companies usually make their MIBs available in the internet.

OPMONis will poll three data values by SNMPv1:

  1. UPS status (charging or discharging)
  2. Remaining runtime in minutes
  3. Charging level in percent

 

Polling of the UPS status via SNMP

Most UPS provide in case of a power failure the “runtime on battery”. This value is 0, while the UPS is running supported by a power supply. Beginning with the power outage this value increases and mostly is displayed as runtime on battery in milliseconds. But each company can choose their own way and e.g. provide the value as runtime on battery in seconds.

Therefore, we choose an approach that makes this unimportant for OPMONis. For OPMONis it´s only important if the UPS is on status “charging” or on status “discharging”. This is why the polled SNMP value is rated by a regular expression (Regex). In case the Regex is rated as a match, OPMONis will interpret this as “charging”, in any other case as “discharging”.

For OPMONis this means: In the already mentioned standard MIB “RFC 1628” it is defined, that by OID „1.3.6.1.2.1.33.1.2.2.0” it is possible to poll the UPS runtime on battery in seconds. By the regular expression „^[1-9][0-9]*$“ it will be rated if the runtime is bigger than 0, which would mean that there is in fact a power outage occurring.

Requesting the remaining runtime and the charging status via SNMP

To be able to recognize the reach of the thresholds, determined in the UPS settings, OPMONis needs two more values: The remaining runtime and the remaining capacity in percent.

Again, we have to take a look in the standard MIB “RFC 1628” where the needed OIDs are defined:

  • 3.6.1.2.1.33.1.2.3.0 for remaining runtime in minutes
  • 3.6.1.2.1.33.1.2.4.0 for capacity of the battery in percent

It seems that there are differences for the different companies in which format this data is provided (e.g. minutes, seconds and even milliseconds). Therefore we added a multiplier that allows to adjust the value to the needed format.