kerwenwwer / pwrstat-exporter

Cyberpower UPS Linux daemon (pwrstat) exporter for prometheus
MIT License
29 stars 8 forks source link

Only returns "ups_state" #5

Open rthinkel opened 1 year ago

rthinkel commented 1 year ago

Hey there, thanks for making an exporter for pwrstat. My only issue is that I seem to only get the value for "ups_state" and nothing else.

arcenik commented 3 months ago

Same for me.

Looks like the pwrstatd daemon fails to communicate with the UPS.

# cat /var/log/pwrstatd.log 
2024/07/11 15:19:30 PM  Daemon startups.
2024/07/11 15:19:44 PM  The H2C device can't be used, because the linux system does not support libusb or libusb version is too old.
2024/07/11 15:20:48 PM  Communication is established.
2024/07/11 15:20:51 PM  Utility failed.
2024/07/11 15:20:51 PM  Begin to shutdown PC immediately!
2024/07/11 15:20:57 PM  Communication is lost.
krispayne commented 3 months ago

@arcenik that sounds like a connection issue, not an issue with the exporter. Make sure that the exporter can see the device and that the device is reliably connected.

I just set this up (docker-compose method) and it is working flawlessly!