I decided to implement the notification system using UDP, as I didn't want the server connected to the managed UPS to hang around waiting for a bunch of machines to respond to a "power-out" announcement, especially because at any given moment some boxes could be up and others powered off. So I wrote a small Perl program to spray out a UDP notification message to the entire range of IP addresses for each Class C network listed therein.
Implementing the receiver program presented a little more difficulty, however, because I didn't want to go through the trouble of writing a full-blown server daemon that listened for UDP messages. Moreover, some of the systems lack Perl, others lack a compiler, and it didn't want to have create a new receiver implementation for each machine. After giving it some thought, I realised that all the machines have an inetd/xinetd equivalent and if not Perl, at the very least, a shell. Inetd-style programs can be configured to listen for either a TCP or a UDP connection on a specified port, and when one is established, to spawn a given process and hand off the connection to it, which is then piped to the standard I/O of the process. This means, in effect, that I could write a very simple shell script to parse the input for a pre-determined "power out" message. To prevent false alarms, I decided that the notifier would send out the notification with a predetermined text key embedded therein, which the receiver would use to accept the announcement, ignoring any others. And because inetd-style programs runs as root, the subsequently-called shell script does as well, hence a proper shutdown command can be executed as root from within the script, thus shutting down the system.