Apcupsd's Support for SNMP UPSes

General

Apcupsd version 3.10.0 or later provides direct support for SNMP UPSes. To run apcupsd with an SNMP UPS, you need the following things:

Connecting an SNMP UPS

The Simple Network Management Protocol provides an interface to connect to remote devices through the network. apcupsd is now capable of using the SNMP interface of an SNMP-enabled UPS to communicate with an UPS. Currently apcupsd supports only APC's PowerNet MIB. To enable the SNMP support it is enough to configure the correct device in your apcupsd.conf configuration file. The directive needed for this configuration is:

  DEVICE 192.168.100.2:161:APC:private

where the directive is made by four parts:

Building and Installing apcupsd

Follow the instructions in the Installation Chapter of this manual, being sure to include the following options (in addition to any others you need) on the ./configure line:
  ./configure \
  --with-serial-dev= \
  --with-upstype=snmp \
  --with-upscable=smart \
  --enable-pthreads \
  --enable-snmp

SNMP Specific Information

The SNMP connection gives less information compared to a serial smart cable. This is not a problem as the most useful information is given, together with a number of secondary parameters that are informative enough to run safely your UPS.

Known Problems

Power Off (killpower) of SNMP UPS needs special handling

Currently (as of 3.10.0) the code to power off the UPS needs special configuration. The killpower command for SNMP UPSes can not be issued during shutdown as typically at some time during shutdown operations the network stack is stopped. To overcome this problem it is needed to modify the /etc/rc.d/apcupsd system control script to tell apcupsd to issue the power down command (killpower) to the UPS immediately before apcupsd initiates the system shutdown. For this reason it is paramount to set your UPS grace time to a value greater than 120 seconds to allow for clean shutdown operations before the UPS removes the power from its plugs. To enable correct shutdown operation during powerdown do the following:

With this setup your UPS operations should be safe.


Back Next Home