apcupsd_exporter: invalid duration Noalarm

Greetings, I tried testing apcupsd_exporter on my proxmox v5.0-32 server with apcupsd running and received this error when trying to access the metrics through browser:

2017/11/09 14:32:48 [ERROR] failed collecting UPS metric Desc{fqName: "apcupsd_battery_volts", help: "Current UPS battery voltage.", constLabels: {}, variableLabels: [hostname ups_name model]}: time: invalid duration Noalarm

I know apcupsd works perfectly as I’m able to get info on my UPS server using apcaccess status easily. Any idea what’s up with that?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

I found a way to fix error parsing time like “28/01/15” as “2006-01-02”: cannot parse “1/15” as “2006” https://github.com/Piyanan/apcupsd_exporter/commit/1038a7913e685477d8f64a0ea519733eb477835d IF anyone stuck.

Sorry, took a bit to figure out how to compile it. Works now! Thank you so much for making the changes.