I need to manage two UPSes but my host can set and monitor only one. So I thinked to install NUT UPS on a Raspberry to monitor both UPSes and to create a dummy ups. The two UPSes are identical and both have LAN cards but I can connect them via USB if desiderable. Can I connect the Raspberry to the host via USB for dummy UPS communications? The dummy ups should do: - notify ON_BATTERY if both UPSes are on battery - if both go on LOW battery, change its status to LOW battery also - send a shutdown comamnd to both UPSes with a delay of 5 minutes so the host can gracefully stops all VMs and itself - turn off the Raspberry? The NUT server should send notifications on real status of both UPSes via mail. Is it possible? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20220617/679ebf6f/attachment.htm>
On Fri, 17 Jun 2022, PeReZ via Nut-upsuser wrote:> I need to manage two UPSes but my host can set and monitor only one.How are they connected? What software are you using?> So I thinked to install NUT UPS ...NUT in itself is not a UPS. It is a software package.> ... on a Raspberry to monitor both UPSes and to create a dummy ups.I don't understand this. If the Raspberry is monitoring the two UPSes, why do you need a dummy ups?> The two UPSes are identical and both have LAN cards but I can connect them via > USB if desiderable. > > Can I connect the Raspberry to the host via USB for dummy UPS communications?I don't understand the topology. A diagram would help.> The dummy ups should do: > - notify ON_BATTERY if both UPSes are on battery > - if both go on LOW battery, change its status to LOW battery also > - send a shutdown comamnd to both UPSes with a delay of 5 minutes so the host can gracefully stops all VMs and itself > - turn off the Raspberry?Have you seen the configuration file for a dummy UPS? (File ups.conf) It does not provide such complex logic. Roger
On 6/17/22 11:55, PeReZ via Nut-upsuser wrote:> I need to manage two UPSes but my host can set and monitor only one.why only one ?> > So I thinked to install NUT UPS on a Raspberry to monitor both UPSes > and to create a dummy ups. > > The two UPSes are identical and both have LAN cards but I can connect > them via USB if desiderable.All the UPSes I know that have LAN cards support SNMP so -- assuming yours do not deviate from this - you should be able to monitor both of them directly from any computer that can speak SNMP. You do not need the PI or the dummy UPS.> > Can I connect the Raspberry to the host via USB for dummy UPS > communications? > > The dummy ups should do: > - notify ON_BATTERY if both UPSes are on battery > - if both go on LOW battery, change its status to LOW battery also > - send a shutdown comamnd to both UPSes with a delay of 5 minutes so > the host can gracefully stops all VMs and itself > - turn off the Raspberry? > > The NUT server should send notifications on real status of both UPSes > via mail. > > Is it possible?I guess it is but I fail to understand why do you complicate your life with this approach instead of monitoring both UPS via SNMP and maybe using setting two semaphores ( one per UPS ) and doing a logical AND between the conditions with a simple script written in any language of your choice. wolfy