APC UPS Battery Last Replacement Date

APC has a SNMP OID for the date that the battery was last replaced. Curious if this could be added to the APC device and overview page. This is used by us to proactively replace batteries.

upsBasicBatteryLastReplaceDate
.1.3.6.1.4.1.318.1.1.1.2.1.3

3 Likes

Hello,

over three laters I want to follow up on this. Actually I had already made a PR which even got accepted, but later reverted due to an error during tests.

Nevertheless, jellyfrog implemented the upsBatteryRecommendedReplaceDate as a Counter which is a nice thing, but for us there are two problems:

a) Not all of our devices have this value set. Some of them are probably a tad too old, but reality is a bitter pill … and therefore these remaining devices (almost 20%) have to prevail

b) The date is a bit suspicious. In some cases the difference between the actual last replacement date and the recommended next replacement is 52 months, at the next device 58, etc.

For our purposes having a counter like “Battery Days Since Last Replacement” would be a more honest (read: usable) thing. We could easily monitor the age of your battery and even define warn limits – or a device group that includes all device exceeding a certrain threshold.

If this feature is acceptable, I would implement it myself – basically the same as jellyfrog implemented issue #14653 which means using the dateToDays user function. Affected files would be:

  • includes/definitions/discovery/apc.yaml (=> new section with oid: upsBasicBatteryLastReplaceDate etc.)
  • tests/data/apc_sua750i.json
    • add another section for this date value
  • tests/snmpsim/apc_sua750i.snmprec
    • add a line for the new OID, could probably use the same data … or any

I’m not sure if defining limits is a good idea here. Last time I chose 4 and 5 years which was accepted, but actually everybody might handle the situation differently. Unless someone has a convincing argument, I propose to leave all limits at zero.

So: If this feature is acceptable, I would implement it (and open an issue on github).