I use an APC with a management cable, triggers graceful shutdown and startup on reconnection. It also e-mails me and stores a log. I prefer this approach so 99% of ecosystem isn't on the server, you can let your server do server things and not be the battery police.

Yep, I have used apcupsd on Linux, Windows and macOS for more than a decade. It’s been triggered many times, too!

How does it trigger the shutdown? Does it have a power switch connection to the motherboard?

shutdowns can be done in software like 'sudo systemctl halt', so it doesn't need a line straight to the motherboard. That's the desired path because it lets running applications gracefully close and finish writing to disk.

Well, yes. But they liked that "99% of ecosystem isn't on the server" which makes me think it isn't a software solution. What is the 1%?