-
-
Notifications
You must be signed in to change notification settings - Fork 351
Monitoring‐only NUT clients
A frequent question is:
Is it possible to put a NUT driver to something like a "read only" or "monitor only" mode in respect to the communication with the hardware? The idea would be to not allow NUT to switch off the power at the UPS at all.
On one hand, it would generally help to read up the documentation about NUT architecture, seeing as it is a crucial part of your systems' uptime and data integrity.
On another hand, for this particular use-case: it is quite possible to set up monitoring-only systems which only inform you if some other NUT data server has had interesting situations, or mixed-monitoring systems for that matter.
The software part of NUT responsible for actually shutting down a computer is typically the upsmon
client, whose SHUTDOWNCMD
setting (in upsmon.conf
) defines how to go about the routine. NUT drivers do interact with devices (and can send power-off commands to supported UPSes in case of killpower
flag being processed), but they do not make the decision to do so - the upsmon
client running on that box does, based on it being the primary (ex-master) system for the UPS meaning it has the physical media to talk to the device (serial/USB/networked/...). An upsmon
client running in "primary/master" mode on the system that can actually talk to the UPS would have a MONITOR
line with specification of how many PSUs of this server that UPS feeds (1 or more) and a MINSUPPLIES
line to specify how many PSUs (1+) should be fed to consider the server capable of running indefinitely as far as having power is the question. On redundant servers you can have something like "1 of 2 is okay", or "1..3 out of 4" depending on the blade chassis population, etc. When the situation gets critical, a "primary" upsmon
client would set the local KILLPOWER
flag which would cause the OS late-shutdown scripts (where supported) to run a driver instance talk to the UPS again and tell it to power off and recycle when safe to do so (and thus avoid the "power race condition" where the wall power comes back while half of your rack is already down, so it sits for days waiting for someone to power all servers back on).
As far as monitoring-only clients are concerned, you can set the argument to the MONITOR line un upsmon.conf
, that the tracked (and often "secondary") UPS feeds zero (0) power sources of this particular monitoring box, which makes sense if it sits in a different building for example. Orthogonally to that, you can also specify MINSUPPLIES 0
to a purely monitoring system, impacting the trigger for its own shutdown (as long as that many PSUs are fed, all is okay). In a mixed system, having its own UPS(es) and monitoring some remote NUT data servers, you would have a mix of "local" MONITOR lines with a non-zero count of PSUs fed (summing up to your MINSUPPLIES for a healthy uptime) and other MONITOR lines with the zero amount of fed PSUs.
Welcome to the Network UPS Tools (NUT) project Wiki, and feel free to contribute tricks and insights.
While there are several good entries in the menu, ones referenced most frequently in issue discussions include:
- Building NUT for in-place upgrades or non-disruptive tests and Using NIT (NUT Integration Test suite) sandbox
- Technicalities: Customizing (NUT) config files and scripts delivered by packaging
- Links to distribution packaging recipes and repository sections
- Troubleshooting
upsdrvctl
drivers not starting ("insufficient permissions on everything" or "Can't claim USB device [VVVV:PPPP]@0/0: Entity not found") possibly due to nut-driver-enumerator (NDE) services having been there before you with NUT 2.8.x - Changing NUT daemon debug verbosity
- Building NUT integration for Home Assistant
- Running NUT in an LXC container
- Troubleshooting eventual disconnections (Data stale) and CyberPower Systems (CPS) know-how
- NUT for Windows
- NUT HCL and DDL
- Code contributions, PRs, PGP and DCO
- NUT CI farm
Also keep in mind the documentation links from NUT website and the FAQ in particular.