我有一个 NUT 客户端,它要求将其监控的 UPS 命名为ups
. 客户端(Synology NAS)不提供更改此配置的方法。我的设置包括由单个主机监控的多个 UPS,我宁愿不命名 1/4 UPS ups
,而将其他 3/4 命名为描述性且有助于管理的名称。
我想我应该能够dummy-ups
在中继器模式下使用驱动程序来创建一个名为的虚拟 UPS ,该 UPSups
跟踪名为其他名称的真实 UPS 的状态(即,eaton1
)。
从文档中,我认为我ups.conf
应该如下所示:
[eaton1]
driver = usbhid-ups
serial = "..."
port = auto
desc = "Eaton PW9130L1500R-XL2U #1"
[eaton2]
driver = usbhid-ups
serial = "..."
port = auto
desc = "Eaton PW9130L1500R-XL2U #2"
#More UPSes...
[ups]
driver = dummy-ups
port = eaton1@localhost
desc = "Dummy UPS"
但这不起作用。当我重新启动 nut 时,我在 syslog 中看到以下内容,其中 192.168.1.2 是 Synology NAS 的 IP 地址:
16:09:46 nut-server usbhid-ups[22208]: Startup successful
16:09:46 nut-server usbhid-ups[22210]: Startup successful
[#One for each UPS]
16:09:47 nut-server upsd[22216]: listening on 192.168.1.1 port 3493
16:09:47 nut-server upsd[22216]: listening on localhost port 3493
16:09:47 nut-server upsd[22216]: Can't connect to UPS [ups] (dummy-ups-ups): No such file or directory
16:09:47 nut-server upsd[22216]: Connected to UPS [eaton1]: usbhid-ups-eaton1
16:09:47 nut-server upsd[22216]: Connected to UPS [eaton2]: usbhid-ups-eaton2
16:09:47 nut-server upsd[22217]: Startup successful
16:09:47 nut-server upsmon[22219]: Startup successful
16:09:47 nut-server upsmon[22221]: Poll UPS [ups@localhost] failed - Driver not connected
16:09:47 nut-server upsmon[22221]: Communications with UPS ups@localhost lost
16:09:52 nut-server upsd[22217]: User [email protected] logged into UPS [ups]
16:09:52 nut-server upsmon[22221]: Poll UPS [ups@localhost] failed - Driver not connected
16:09:52 nut-server upsmon[22221]: UPS ups@localhost is unavailable
16:09:57 nut-server upsmon[22221]: Poll UPS [ups@localhost] failed - Driver not connected
16:10:21 upsmon[22221]: last message repeated 3 times
如果我将端口条目dummy-ups
留空,则 Synology UPS 连接正常,但dummy-ups
在模拟模式下运行时,它无法获取任何 UPS 信息,并且不会在电源故障时关闭。
我正在使用 NUT 2.6.3 运行 ubuntu 12.04.5LTS(ubuntu 包:2.6.3-1ubuntu1.1)
谢谢你的帮助。
编辑:修正了我的例子中的一个错字ups.conf