Debian – Can’t get upsmon service started to monitor (and respond to) remote UPS

debiannutraspbianups

I am having difficulty getting my nut install to simply monitor a single remote UPS attached to a Buffalo LinkStation Duo. I can manually correctly read its status using upsc ups@buffalo.local and it is user / passwordless.

Long-run, what I want is for my system to monitor this remote UPS – if it goes into battery operation, I want my system to shut down (the UPS behaviour itself will be managed by the LinkStation Duo).

Relevant config files

#/etc/nut/upsmon.conf

MONITOR ups@buffalo.local
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYMSG ONLINE    "UPS %s on line power"
NOTIFYMSG ONBATT    "UPS %s on battery"
NOTIFYMSG FSD       "UPS %s: forced shutdown in progress"
NOTIFYMSG SHUTDOWN  "Auto logout and shutdown proceeding"
NOTIFYFLAG ONLINE   SYSLOG+WALL
NOTIFYFLAG ONBATT   SYSLOG+WALL
NOTIFYFLAG FSD  SYSLOG+WALL
NOTIFYFLAG SHUTDOWN SYSLOG+WALL
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

#/etc/nut/nut.conf

MODE=netclient

The other config files are untouched – that is they do not implement any local UPSes (as there are none) – but I think that might be part of my issue, as in /var/log/syslog we have this after boot:

upsdrvctl[559]: Network UPS Tools - UPS driver controller 2.7.2
upsmon[588]: fopen /var/run/nut/upsmon.pid: No such file or directory
upsmon[588]: /etc/nut/upsmon.conf line 86: invalid directive MONITOR ups@buffalo.local
upsmon[588]: Using power down flag file /etc/killpower
upsmon[588]: Network UPS Tools upsmon 2.7.2
upsmon[588]: Fatal error: insufficient power configured!
upsmon[588]: Sum of power values........: 0
upsmon[588]: Minimum value (MINSUPPLIES): 1
upsmon[588]: Edit your upsmon.conf and change the values.

So upsmon doesn't think I have correctly configured the remote UPS – but I don't know how to configure it to be user / passwordless. Any help would be gratefully received – I have spent a fair bit of time with Google on this and find myself stuck.

Best Answer

For some ridiculous reasons the client's upsmon requires the password for readonly operation. Fake passwords don't work (while e.g. nut-monitor will accept it). This could be troubling if passwords are not used / not visible to the user, especially for appliances. Some users will set up the configuration, start the service (often no error reported) and keep the dysfunctional configuration running for years.

Luckily millions of appliances will have some of the credentials collected below, in order to try a little dictionary attack:

  • monuser / secret
  • monuser / pass
  • upsmon / 123456
  • upsmon / pass
  • admin / 123456
  • UPSMON / UPSMON
  • upsmon / fixmepass
  • realadminuser / realadminpassword (if a distro takes a bit care of it, but usually for admins only)

If there's an access to the UPS host, it'd make sense to search for a copy of the configfile in case it's not placed in /etc/nut:

find / -name uspd.users
Related Topic