This article describes, how you can monitor a APC UPS unit on Debian Etch.
1. Install apcupsd
aptitude install apcupsd
2. Configuration
vim /etc/apcupsd/apcupsd.conf
If you connect the server to the UPS unit with an USB cable use:
# USB configuration UPSCABLE usb UPSTYPE usb
If you connect the server over ethernet use this configuration:
# Network configuration UPSCABLE ether UPSTYPE snmp DEVICE IP_OF_THE_UPS:161:APC:private
You should read the “MINUTES” and “TIMEOUT” options.
MINUTES=3 means the system shutdown on 3 minutes remaining on the USV. TIMEOUT 0 disables shutdown after X seconds on battery.
3. Enable configuration
vim /etc/default/apcupsd
ISCONFIGURED=yes
4. Start apcupsd
/etc/init.d/apcupsd start apcaccess status
This should show you some details about the USV and the state of the USV. (See screenshots)
5. Install Webinterface
aptitude install apcupsd-cgi
http://IP_OF_YOUR_SERVER/cgi-bin/apcupsd/multimon.cgi
6. Using CACTI
Look at the cacti forum http://forums.cacti.net/about15908.html for some templates to monitor your APC unit with cacti.
If you using an USB connection you should use the cacti apcupsd template. http://forums.cacti.net/about14481.html
You can query several apcupsd servers over the network or on localhost. Read the installation readme and the posts in the cacti forum. You have to change the script path in the check file and i have to remove the “content” line from the scripts.
Malte
5 Feb 2009Danke für die Anleitung!
Ich habe die USV über USB angeschlossen und dazu in /etc/apcupsd/apcupsd.conf für DEVICE einen Leerwert eingetragen, so dass die USB automatisch erkannt wird.
Eine einfachere Form der Abfrage über apcupsd-cgi wäre vielleicht noch
http://localhost/cgi-bin/apcupsd/multimon.cgi