banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Hardware

banshee/hardware-collection/hardware/ups/apc/snmp/

status

The battery to replace, defective battery packs, operating state, runtime, load and self-test of an APC UPS by SNMP.

  • hardware
  • ups
  • apc
  • schneider
  • powernet
  • battery
  • snmp

par banshee0 installation1 version

v1Dernière

Publiée le 28 octobre 2026. First version.

APC UPS, by SNMP (PowerNet-MIB)

Returns, for an APC UPS with a network management card, what UPS-MIB does not say: whether the UPS asks for its battery to be replaced, how many of its external battery packs it finds defective, and its operating state in APC's own words (smart boost or trim, the kinds of bypass, sleeping, off). With them, the runtime and the charge left, the internal temperature, the load and the last self-test: one probe is enough on a card where UPS-MIB is turned off. Eight watches are offered, each one set on the probe.

Versions

Generic: written for PowerNet-MIB, the MIB of APC's network management cards, whose objects read here have kept their number since they appeared; the newer operating states (13 to 28) come with newer firmware, and a UPS that does not have them never reports them. Hence the common level.

How it works

The collector walks four small branches under 1.3.6.1.4.1.318.1.1.1:

ObjectOIDRead as
upsBasicOutputStatus.4.1.1.0status: on-line (2), on-battery (3), smart-boost (4), timed-sleeping (5), software-bypass (6), off (7), rebooting (8), switched-bypass (9), hardware-failure-bypass (10), sleeping-until-power-return (11), smart-trim (12), eco-mode (13), hot-standby (14), on-battery-test (15), emergency-static-bypass (16), static-bypass-standby (17), power-saving-mode (18), spot-mode (19), e-conversion (20), and the others of the MIB to 28; unknown (1)
upsAdvBatteryReplaceIndicator.2.2.4.0replace-battery: no (1), yes (2)
upsAdvBatteryNumOfBadBattPacks.2.2.6.0bad-battery-packs
upsAdvBatteryRunTimeRemaining.2.2.3.0runtime, in minutes (the agent counts hundredths of a second); not returned at 4294967295, which says the UPS does not know
upsAdvBatteryCapacity.2.2.1.0charge, in %
upsAdvBatteryTemperature.2.2.2.0temperature, the UPS's internal temperature in °C; not returned at 255, which says it does not know
upsAdvOutputLoad.4.2.3.0load, in % of the UPS's capacity
upsAdvTestDiagnosticsResults.7.2.3.0self-test: ok (1), failed (2), invalid-test (3), in-progress (4)
  • A state the MIB does not name is returned as state <number>.
  • A value the UPS does not serve is not returned. An agent that serves no upsBasicOutputStatus stops the collector misconfigured.
  • The collector only reads: SNMP sends nothing but reads. No self-test is started.

Prerequisites

  • The SNMP agent of the network management card enabled, reachable from the poller (UDP 161), its access restricted to the poller.
  • Read-only access, SNMPv2c or SNMPv3, set on the host or one of its folders (protocol:snmp:* variables).

Outputs

NameLabelUnitPer instance
statusOperating state—no
replace-batteryBattery to replace—no
bad-battery-packsDefective battery packs—no
runtimeRuntime leftminno
chargeBattery charge%no
temperatureInternal temperature°Cno
loadLoad%no
self-testLast self-test—no

Watches

NameTitleKindDefaultsChecked by default
on-batteryOn battery, bypass or offstate to avoid, on statuswarning on on-battery, software-bypass, switched-bypass, static-bypass-standby; critical on off, hardware-failure-bypass, emergency-static-bypass, timed-sleeping, sleeping-until-power-returnyes
replace-batteryBattery to replacestate to avoid, on replace-batterywarning on yesyes
bad-battery-packsDefective battery packsabove a threshold, on bad-battery-packswarning above 0yes
runtimeLittle runtime leftbelow a threshold, on runtimewarning below 15 min, critical below 5 minyes
chargeBattery not chargedbelow a threshold, on chargewarning below 50 %, critical below 20 %, for 2 runsyes
temperatureUPS too hotabove a threshold, on temperaturewarning above 40 °C, critical above 50 °C, for 3 runsyes
loadOverloadedabove a threshold, on loadwarning above 80 %, critical above 95 %, for 3 runsyes
self-testSelf-test failedstate to avoid, on self-testcritical on failedyes
  • Smart boost and smart trim are the UPS correcting a low or a high mains voltage on its own: they raise nothing. A self-test (on-battery-test) raises nothing either.
  • On a card that also serves UPS-MIB, ups/snmp/status adds the time on battery and the alarms; the watches this collector shares with it are then unchecked on one of the two probes.

Limits

  • The runtime and the charge are the UPS's estimates.
  • Not checked against an APC UPS: the OIDs and values are those of PowerNet-MIB as its public copies give it (LibreNMS, Observium, Netdisco, gathered by oidref.com).