大网数据广告活动
服务器运维问答

Can't get upsmon service started to monitor (and respond to) remote UPS

· 52CE 我爱测

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 [email omitted] and it is user / passwordless. Long-ru…

问题原文

原帖链接 · stefandz · CC BY-SA 3.0

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 [email omitted] 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 [email omitted]
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 [email omitted]
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.

已采纳解答

原帖链接 · user533385 · CC BY-SA 4.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-07-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。