Cacti (home)ForumsDocumentation

APC UPS Daemon

type:
user_template_data
usertemplate:
apcupsd
version:
1.1
script:
PHP Script Server
author:
bsod2600
description:
apcupsd - APC data via APC UPS Daemon (apcupsd) for non-SNMP hardware
Cacti:
0.8.7a
date:
2008-02-08
includes:
yes
templates:
apc,
ups

Download

VersionFile
0.8.7aapcupsd_1.1.zip

Requirements

  • APC UPS Daemon (apcupsd) installed on both the remote and Cacti PCs.
  • NIS (Network Information Server) feature enabled in apcupsd.

Installation

  1. Copy the query_ script to your /cacti/scripts/ directory
  2. Modify the query_ script and change the $APCACCESS_PATH variable to the location of apcaccess on your system
  3. Test the script to make sure it works. Run: php query_apcupsd myserver 3551. You should see output like: LINEV:122.0 LOADPCT:47.0 BCHARGE:100.0 TIMELEFT:15.6 BATTV:27.1 TONBATT:0 NOMINV:120 NOMBATTV:24.0. This will vary, depending on what fields are supported by the UPS.
  4. In Cacti, add the APC UPS Statistics data input method.
  5. In Graph Management, add the APC Battery Statistics and APC Line Statistics templates. Fill in the various fields from the dropdown boxes.
  6. Wait for the graphs to appear!

Screenshots

Sample image

Sample image from a Back-UPS RS 1200

Notes

I designed the script and templates so they could easily be extended. If there are additional fields which 'apcaccess status' returns, which you want to graph, then one just needs to edit the php script. In the apcupsd_parse function, add additional elseif statements to the “Advanced APC parameters” portion. Veryify the script properly spits out the new data. Then in Cacti, edit the APC UPS Statistics Data Input Method. Add the additional field(s) you added to the php script to the Output Fields portion. Next, modify the APC UPS Statistics Data Template. Add the new Data sources for each of the new field(s) you previously added. Make sure to select the correct Output Field from the dropdown list and set a rational Min/Max Value. Lastly, edit an APC graph template and add the additional field(s).

Change Log

1.1: Fixed APC Battery template due to cacti import bug. Exported with cacti 0.8.7a
1.0: Initial release. Exported with cacti 0.8.6j

Support

Use this forum post






Personal Tools