NUT uses a server (upsd) and a client (upsmon). This looks helpful.
https://hackernoon.com/how-to-shutdown-your-servers-in-case-of-power-failure-ups-nut-co-34d22a08e92
The project docs are also quite good.
https://networkupstools.org/docs/user-manual.chunked/