If you have a single server and a UPS with a USB interface, you can have the server shutdown properly when backup power wanes just by attaching it and adjusting the settings in Energy Saver.
But if you have a big, fancy UPS with a network card, the host OS must be setup to receive messages from the UPS over the network. As of 12/9/2014, for APC use PowerChute Network Shutdown v3.01 for OSX &etc. See the installation guide there:
Installing on Mac OS X
a. Download installer (pcns301Mac.tar.gz) from the link above
b. Go to the folder on the Mac where you put the installation files.
c. Double-click on the file install.command
d. A terminal window opens, prompting you for your password.
e. Enter your password.
The PowerChute Network Shutdown daemon starts automatically when the installation is completed. You can then delete the installation files.
If the host OS does not have the Java Runtime Environment installed on it the install will not occur and a dialog appears. Click on 'More Info' to display the JRE download page. Install JRE, then try the install again.
Configuring
Default login is apc:apc
Default User Phrase: "admin user phrase"
Configure connected machines running PowerChute Network Shutdown by going to http://ip-of-machine:3052 using the same credentials as the card.
To configure shutdown on a connected machine, login, then:
- Select Configure Events from the menu.
- Click on the circle under Shut Down System for the UPS: On Battery event.
- Check the box and set the time to shutdown after (1/2 hour, 1800 seconds is a good starting point).
Misc
To stop PowerChute Network Shutdown, type the following at the command line:
sudo /Library/StartupItems/comapcpcns/comapcpcns stop
To start PowerChute Network Shutdown manually, type the following at the command line:
sudo /Library/StartupItems/comapcpcns/comapcpcns start
To remove PowerChute Network Shutdown, run the uninstall script.