Closed toby11 closed 3 years ago
I have raised this against the upstream issue as well mdlayher/apcupsd#6
BTW, you can use triple backticks for the multiline code formatting:
10 PRINT "Hello World" 20 GOTO 10
I am also running into this issue. In researching it I found there has been a commit that might solve this issue: https://github.com/mdlayher/apcupsd/commit/149abe0674c282fb1cba644fe2a758ae6ca14bc8
Looks like this commit was added since the last time the library has been updated. Are you able to update the library again to see if this resolves the issue?
I am experiencing the same issue. From what I can gather it appears that the previous update may have fixed this issue when the string is mm/dd/yy, but the issue remains with the 4 digit year (mm/dd/yyyy).
Here is the BATTDATE string from the output of apcaccess status:
BATTDATE : 09/15/2020
Unfortunately, I am not very familiar with GO otherwise I would attempt to resolve and contribute. Perhaps if the BATTDATE issue is not quickly resolved, we could have an updated config that would allow for selection of fields to monitor for, allowing us the option to not monitor BATTDATE. That, or if the plugin would fail gracefully like others and just not record the one field instead of erring out completely.
Appreciate everyone that contributes to this project and do hope the issue is resolved soon.
I seem to have the exact same issue:
2020-11-20T14:06:51Z E! [inputs.apcupsd] Error in plugin: can't parse time: "02/19/2020"
Snipped apcaccess
output:
MANDATE : 02/19/2020
BATTDATE : 02/19/2020
I am using Telegraf 1.16.2
Pinging @glinton as you seem to have resolved the previous issue (#6394)
Apparently updating the dependency and testing against the latest master
branch was easier then expected. PR #8444 updates the dependency after which the apcupsd plugin works again with a BATTDATE
of 02/19/2020
.
Relevant telegraf.conf:
System info:
Telegraf 1.12.4 / Proxmox 6 (Debian Buster) apcupsd 3.14.14 (31 May 2016) debian
Steps to reproduce:
Using telegraf with apcupsd enabled
Expected behavior:
apcupsd stats to be correctly processed and no error messages
Actual behavior:
BATTDATE fails to be processed
Additional info:
[inputs.apcupsd] Error in plugin: can't parse time: "12/28/2013"
Here is my apcaccess output (apologies for formatting - not sure why the newlines are not being shown)