I’ve got a separate system as master for my ups and would like to set up truenas scale as a slave. After doing the setup (details below) I’m getting the following error in /var/log/daemon.log:
Sep 21 08:31:14 truenas systemd[1]: nut-driver@ups.service: Scheduled restart job, restart counter is at 8268.
Sep 21 08:31:14 truenas systemd[1]: Stopped nut-driver@ups.service - Network UPS Tools - device driver for ups.
Sep 21 08:31:14 truenas systemd[1]: Starting nut-driver@ups.service - Network UPS Tools - device driver for ups...
Sep 21 08:31:14 truenas nut-driver@ups[265960]: FATAL: The '/etc/nut/ups.conf' file does not exist or is not readable
Sep 21 08:31:14 truenas nut-driver@ups[265959]: FATAL: Could not find a NUT device section for service unit ups
Sep 21 08:31:14 truenas systemd[1]: nut-driver@ups.service: Control process exited, code=exited, status=1/FAILURE
Sep 21 08:31:14 truenas systemd[1]: nut-driver@ups.service: Failed with result 'exit-code'.
Sep 21 08:31:14 truenas systemd[1]: Failed to start nut-driver@ups.service - Network UPS Tools - device driver for ups.
I tried touch ups.conf; chown root:nut ups.conf, but I then got a similar error saying that the file was empty. Opening a shell in TrueNAS and running upsc ups@10.17.17.10:3493 successfully connects to the ups.
On my master system I’ve added the following to upsd.users and restarted:
All fields below that are left as default or empty.
Shutdown mode: UPS goes on battery
Shutdown Timer: 30
Host Sync: 15
Power off UPS: Disabled
Everything else: empty
Did anyone find a fix for this? Our local energy provider has a fault on their network and we keep getting power cuts so I need to get this sorted out.
I believe I manually edited the files in /etc/nut. It was a while ago though so I can’t tell you for sure what I did to solve it, but it does appear to work now. I still cannot see any UPS stats in the reporting menu, I assume that would require it to be the master, but the NAS does power down during a power outage. Here are the contents of those files as they look for me right now:
/etc/nut/nut.conf
MODE=netclient
/etc/nut/upsmon.conf (replace ‘ups’, the ip address, username and password with your equivalents)