After some searching I figured out how to use snmp to get the information I wanted from the APC UPS.
Hope this helps.
Jeff.
HERE IT IS:
#------------------------------------------------------------------------------
download net-snmp-5.3.3.pre1.tar.gz from sourceforge.net
tar xzf net-snmp-5.3.3.pre1.tar.gz
cd net-snmp-5.3.3.pre1
./configure
(accept all defaults)
make
make install
download latest nagios-plugins-1.4.13.tar.gz
tar xzf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
#ADD The following:
#------------------------------------------------------------------------------
###############################################################################
add the following line to your nagios.cfg file
###############################################################################
Definitions for monitoring an APC UPS
cfg_file=/usr/local/nagios/etc/objects/apcups.cfg
#------------------------------------------------------------------------------
create the following file in objects folder
###############################################################################
APCUPS.CFG - CONFIG FILE FOR MONITORING APC UPS
Created: 2009-03-01 - jeff manross
###############################################################################
HOST DEFINITIONS
###############################################################################
Define the UPS that we’ll be monitoring
define host{
use generic-switch
host_name MyUps
alias My APC 2200 Main Server
notification_period 24x7
check_period 24x7
contacts nagiosadmin
address 192.168.1.251
}
###############################################################################
HOST GROUP DEFINITIONS
###############################################################################
define hostgroup{
hostgroup_name apcups
alias apcups
members MyUps
}
###############################################################################
SERVICE DEFINITIONS
###############################################################################
Ping UPS
define service{
use local-service
host_name MyUps
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use local-service
host_name MyUps
service_description UPS Capacity
check_command snmp_ups_capacity! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Current
check_command snmp_ups_current! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Freq In
check_command snmp_ups_frequency_in! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Freq Out
check_command snmp_ups_frequency_out! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Load
check_command snmp_ups_load! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Test Date
check_command snmp_ups_lasttest_date! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Test Result
check_command snmp_ups_lasttest_result! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Status
check_command snmp_ups_stat! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS RunTime
check_command snmp_ups_runtime! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Temp
check_command snmp_ups_temp! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Volts In
check_command snmp_ups_voltage_in! -H $HOSTADDRESS$ -C public
}
define service{
use local-service
host_name MyUps
service_description UPS Volts Out
check_command snmp_ups_voltage_out! -H $HOSTADDRESS$ -C public
}
#------------------------------------------------------------------------------
###############################################################################
SNMP CALLS for UPS
add the following lines to your commands.cfg file
###############################################################################
‘snmp_ups_capacity’ command definition
define command{
command_name snmp_ups_capacity
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -l ‘\Battery Charge’ -u ‘%’
}
‘snmp_ups_current’ command definition
define command{
command_name snmp_ups_current
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.4.0 -w 30 -c 50 -l ‘\Output Current’ -u ‘\Amperes’
}
‘snmp_ups_frequency_in’ command definition
define command{
command_name snmp_ups_frequency_in
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.3.2.4.0 -l ‘\Input Freq’ -u ‘\Hertz’
}
‘snmp_ups_frequency_out’ command definition
define command{
command_name snmp_ups_frequency_out
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.2.0 -l ‘\Output Freq’ -u ‘\Hertz’
}
‘snmp_ups_lasttest_date’ command definition
define command{
command_name snmp_ups_lasttest_date
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.7.2.4.0 -l ‘\Last Test Date’
}
‘snmp_ups_lasttest_result’ command definition
define command{
command_name snmp_ups_lasttest_result
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.7.2.3.0 -c 2 -l ‘\1=Pass 2=Fail’
}
‘snmp_ups_load’ command definition
define command{
command_name snmp_ups_load
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.3.0 -w 60 -c 90 -l ‘\Current Load’ -u ‘%’
}
‘snmp_ups_runtime’ command definition
define command{
command_name snmp_ups_runtime
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 ‘\RunTime’
}
‘snmp_ups_stat’ command definition
define command{
command_name snmp_ups_stat
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.1.1.0 -w 3 -c 4 -l ‘\Main UPS Status’
}
‘snmp_ups_temp’ command definition
define command{
command_name snmp_ups_temp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.2.0 -w 40 -c 45 -l ‘\Internal Temp’ -u ‘\Celsius’
}
‘snmp_ups_voltage_in’ command definition
define command{
command_name snmp_ups_voltage_in
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.3.2.1.0 -l ‘\Output Voltage’ -u ‘\Volts’
}
‘snmp_ups_voltage_out’ command definition
define command{
command_name snmp_ups_voltage_out
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.1.0 -l ‘\Output Voltage’ -u ‘\Volts’
}