APC SmartUPS check if UPS is on batteries or cable

check_apc

This script will check if the UPS is on batteries (and display the percent of battery which is left) or on cable power.

command definition

define command{ command_name check_apc command_line $USER1$/check_apc_on_battery $HOSTADDRESS$ }

service definition

define service{
    use                             default-critical
    host_name                       apc
    service_description             UPS Status
    check_command                   check_apc! $HOSTADDRESS$
    max_check_attempts              1
    notification_interval           5
}