MarkT:
A UPS should have a serial interface you can use to obtain status information I believe.
If it doesn't have a serial interface there's always the status LEDs on the unit. Use a light-dependent resistor or phototransistor to detect when they are on/off.