cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.05k stars 1.1k forks source link

NUT: Network UPS Tools as GUI Addon #17907

Open skorpion1298 opened 1 year ago

skorpion1298 commented 1 year ago

Page:

Hello everyone,

I have a few instances of Cockpit running and on one of them is a APC UPS connected. Currently Ubuntu 22.04 is running a NUT Server on this system where I use the apsc cmd to watch for the UPS in a Terminal which is sometimes unpractical. For example on a phone where Terminal is buggy af.

Is there a possibility to add a nice overview of a NUT GUI into Cockpit? In NethServer for example they did that. Looks beautiful.

Thanks and greetings Skorpion1298

garrett commented 1 year ago

Just to define the terms for anyone else looking at this issue:

The primary goal of the Network UPS Tools (NUT) project is to provide support for Power Devices, such as Uninterruptible Power Supplies, Power Distribution Units, Automatic Transfer Switches, Power Supply Units and Solar Controllers. NUT provides a common protocol and set of tools to monitor and manage such devices, and to consistently name equivalent features and data points, across a vast range of vendor-specific protocols and connection media types.

From https://networkupstools.org/

Nethserver is meant for small offices and medium sized businesses, based on CentOS.

https://www.nethserver.org/

And Nethserver comes with Cockpit and has a lot of Cockpit apps, apparently? I'm not sure what version they're using at the moment; I don't know which version of CentOS they're based on.

https://community.nethserver.org/tag/cockpit

But they do have Cockpit-Machines, as evidenced by the screenshots here: https://community.nethserver.org/t/cockpit-machines-kvm-inside-cockpit/17360


My opinion: It would be a great idea to provide some sort of visual indicator if a UPS (uninterrupted power supply; basically a backup battery for workstations and servers in case power goes out) within Cockpit. It would be pretty important to know if your server is running on backup battery or if the battery is depleted.

However: Our team does all use laptops (that have their own batteries) and is based in Europe (where power cuts are very rare), so I'm not sure if anyone has a UPS to test it with. But I do know how unreliable some places in the world are with power (having lived in the South of the USA for several years, where it was routine to lose power... sometimes for minutes, other times for hours — or even days).

In other words, we might need help with implementing this, since we probably all lack a UPS to test it. I can ask around though, in case some one on the team has a UPS.

GreatMaker commented 9 months ago

Is there any news on this proposed enhancement?

martinpitt commented 9 months ago

In principle this could be developed by anyone. python-dbusmock can mock all kinds of power supplies (AC, battery, UPS) in its upower template. Alternatively, upower's integration tests use umockdev to simulate power supplies on the kernel level.

However, the core cockpit team will not pick this up, at least right now. Conceptually, AC/UPS watching requires automatic monitoring and alerting, not a human staring at a screen -- thus cockpit is a bad tool for doing that. Plus, this requires quite some design and implementation work, which we cannot spend right now.

This is open for contributions, of course!

tomerh2001 commented 6 months ago

+1