AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1152397
Accepted
crackpot
crackpot
Asked: 2024-01-28 00:34:35 +0800 CST2024-01-28 00:34:35 +0800 CST 2024-01-28 00:34:35 +0800 CST

nut客户端配置问题

  • 772

我的机架中有 2 台 UPS NUT 服务器正在运行。1 个在 TrueNAS SCALE 上运行,另一个在 Synology DS918+ 上运行。并且有一个在 ubuntu 服务器上运行的 NUT 客户端。

NUT客户不断抱怨:

Broadcast message from nut@nuc13 (somewhere) (Sat Jan 27 16:16:52 2024):       
                                                                               
UPS [email protected] is unavailable                                     
                                                                               
                                                                               
Broadcast message from nut@nuc13 (somewhere) (Sat Jan 27 16:16:52 2024):       
                                                                               
UPS [email protected] is unavailable                                                                                                             

有人可以帮我解决它吗?

以下是删除注释后我的 upsmon.conf 的内容:

MONITOR [email protected] 1 [username] [password] secondary
MONITOR [email protected] 0 [username] [password] secondary

MINSUPPLIES 1

SHUTDOWNCMD "/sbin/shutdown -h +0"

POLLFREQ 5

POLLFREQALERT 5

HOSTSYNC 15

DEADTIME 15

POWERDOWNFLAG /etc/killpower

RBWARNTIME 43200

NOCOMMWARNTIME 300

FINALDELAY 5

使用telnet,似乎可以工作。以下是从 ubuntu 服务器连接到 DS918+ 的示例(这是基于 IP 的身份验证。不需要登录):

$ telnet 10.27.0.40 3493
Trying 10.27.0.40...
Connected to 10.27.0.40.
Escape character is '^]'.
LIST UPS
BEGIN LIST UPS
UPS ups "Description unavailable"
END LIST UPS
LIST VAR ups
BEGIN LIST VAR ups
VAR ups battery.charge "100"
VAR ups battery.charge.low "10"
VAR ups battery.charge.warning "50"
VAR ups battery.date "2001/09/25"
VAR ups battery.mfr.date "2020/10/04"
VAR ups battery.runtime "1316"
VAR ups battery.runtime.low "120"
VAR ups battery.type "PbAc"
VAR ups battery.voltage "13.6"
VAR ups battery.voltage.nominal "12.0"
VAR ups device.mfr "American Power Conversion"
VAR ups device.model "Back-UPS ES 850G2"
VAR ups device.serial "5B2040T68465  "
VAR ups device.type "ups"
VAR ups driver.name "usbhid-ups"
VAR ups driver.parameter.pollfreq "30"
VAR ups driver.parameter.pollinterval "5"
VAR ups driver.parameter.port "auto"
VAR ups driver.parameter.synchronous "no"
VAR ups driver.version "DSM7-2-60108-221130"
VAR ups driver.version.data "APC HID 0.96"
VAR ups driver.version.internal "0.41"
VAR ups input.sensitivity "medium"
VAR ups input.transfer.high "266"
VAR ups input.transfer.low "180"
VAR ups input.voltage "241.0"
VAR ups input.voltage.nominal "230"
VAR ups ups.beeper.status "enabled"
VAR ups ups.delay.shutdown "20"
VAR ups ups.firmware "938.a2 .I"
VAR ups ups.firmware.aux "a"
VAR ups ups.load "22"
VAR ups ups.mfr "American Power Conversion"
VAR ups ups.mfr.date "2020/10/04"
VAR ups ups.model "Back-UPS ES 850G2"
VAR ups ups.productid "0002"
VAR ups ups.realpower.nominal "520"
VAR ups ups.serial "5B2040T68465  "
VAR ups ups.status "OL"
VAR ups ups.test.result "No test initiated"
VAR ups ups.timer.reboot "0"
VAR ups ups.timer.shutdown "-1"
VAR ups ups.vendorid "051d"
END LIST VAR ups
^]
telnet> quit
Connection closed.

从 ubuntu 连接到 TrueNAS 也没有问题:

$ telnet 10.27.0.61 3493
Trying 10.27.0.61...
Connected to 10.27.0.61.
Escape character is '^]'.
USERNAME [username]
OK
PASSWORD [password]
OK
LIST UPS
BEGIN LIST UPS
UPS APC_ES850_G2-new "APC Back-UPS ES850 G2 new"
END LIST UPS
LIST VAR APC_ES850_G2-new
BEGIN LIST VAR APC_ES850_G2-new
VAR APC_ES850_G2-new battery.charge "100"
VAR APC_ES850_G2-new battery.charge.low "10"
VAR APC_ES850_G2-new battery.charge.warning "50"
VAR APC_ES850_G2-new battery.date "2001/09/25"
VAR APC_ES850_G2-new battery.mfr.date "2023/06/19"
VAR APC_ES850_G2-new battery.runtime "1228"
VAR APC_ES850_G2-new battery.runtime.low "120"
VAR APC_ES850_G2-new battery.type "PbAc"
VAR APC_ES850_G2-new battery.voltage "13.5"
VAR APC_ES850_G2-new battery.voltage.nominal "12.0"
VAR APC_ES850_G2-new device.mfr "American Power Conversion"
VAR APC_ES850_G2-new device.model "Back-UPS ES 850G2"
VAR APC_ES850_G2-new device.serial "5B2325T40076  "
VAR APC_ES850_G2-new device.type "ups"
VAR APC_ES850_G2-new driver.name "usbhid-ups"
VAR APC_ES850_G2-new driver.parameter.pollfreq "30"
VAR APC_ES850_G2-new driver.parameter.pollinterval "2"
VAR APC_ES850_G2-new driver.parameter.port "auto"
VAR APC_ES850_G2-new driver.parameter.synchronous "auto"
VAR APC_ES850_G2-new driver.version "2.8.0"
VAR APC_ES850_G2-new driver.version.data "APC HID 0.98"
VAR APC_ES850_G2-new driver.version.internal "0.47"
VAR APC_ES850_G2-new driver.version.usb "libusb-1.0.26 (API: 0x1000109)"
VAR APC_ES850_G2-new input.sensitivity "medium"
VAR APC_ES850_G2-new input.transfer.high "266"
VAR APC_ES850_G2-new input.transfer.low "180"
VAR APC_ES850_G2-new input.voltage "242.0"
VAR APC_ES850_G2-new input.voltage.nominal "230"
VAR APC_ES850_G2-new ups.beeper.status "enabled"
VAR APC_ES850_G2-new ups.delay.shutdown "20"
VAR APC_ES850_G2-new ups.firmware "938.a2 .I USB "
VAR APC_ES850_G2-new ups.load "28"
VAR APC_ES850_G2-new ups.mfr "American Power Conversion"
VAR APC_ES850_G2-new ups.mfr.date "2023/06/19"
VAR APC_ES850_G2-new ups.model "Back-UPS ES 850G2"
VAR APC_ES850_G2-new ups.productid "0002"
VAR APC_ES850_G2-new ups.realpower.nominal "520"
VAR APC_ES850_G2-new ups.serial "5B2325T40076  "
VAR APC_ES850_G2-new ups.status "OL"
VAR APC_ES850_G2-new ups.test.result "No test initiated"
VAR APC_ES850_G2-new ups.timer.reboot "0"
VAR APC_ES850_G2-new ups.timer.shutdown "-1"
VAR APC_ES850_G2-new ups.vendorid "051d"
END LIST VAR APC_ES850_G2-new
^]
telnet> quit
Connection closed.
ubuntu
  • 1 1 个回答
  • 45 Views

1 个回答

  • Voted
  1. Best Answer
    crackpot
    2024-01-29T02:02:25+08:002024-01-29T02:02:25+08:00

    愚蠢的我。

    我已经解决了这个问题。upsmon.conf 需要从 nut 服务器列出的 ups 实体的确切名称,即 upsmon.conf 的第一行应该是

    MONITOR [email protected] 1 [username] [password] secondary
    MONITOR [email protected] 0 [username] [password] secondary
    
    • 0

相关问题

  • 无法通过 Ubuntu VPN 访问外部网络

  • ubuntu apt-get upgrade - 如何在 shell 中单击确定?

  • VirtualBox 上 Ubuntu 的访客优化技巧 [关闭]

  • 外部硬盘上的 virtualbox 虚拟硬盘驱动器(Vista 主机上的 ubuntu 客户机)

  • 如何在 Ubuntu 上挂载 LVM 分区?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve