Howtos:snmp-apc-smart-ups

From NagiosCommunity

Jump to: navigation, search

Monitoring a APC Smart UPC

Contents


APC Smart UPC devices can well be monitored with the use of SNMP.

Used OID's

These are some OID's that i used:

OID Value
.1.3.6.1.4.1.318.1.1.1.2.1.1.0 Main Battery Status
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 Environment Temperature in degree celsius
.1.3.6.1.4.1.318.1.1.1.2.2.1.0 Battery Capacity %
.1.3.6.1.4.1.318.1.1.1.2.2.2.0 Internal Temperature in degree celsius
.1.3.6.1.4.1.318.1.1.1.4.2.3.0 Output Load %
.1.3.6.1.4.1.318.1.1.1.4.2.4.0 Output Current in Ampere 3~'
.1.3.6.1.4.1.318.1.1.1.4.2.1.0 Output Voltage in Volt 3~'
.1.3.6.1.4.1.318.1.1.1.4.2.2.0 Output Frequency in Herz'

Check Commands

With adding the next lines to the commands file and adding the check commands to the host you can get nice results.

  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 Battery Status'
  }
  
  define command{
     command_name    snmp_ups_envtemp
     command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 -w 29 -c 40 -l 'environment Temperature' -u 'degree celsius'
  }
  
  define command{
     command_name    snmp_ups_capa
     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 'Adv. Battery Capacity' -u '%'
  }
  
  define command{
     command_name    snmp_ups_temp
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.2.0 -w 29 -c 40 -l 'internal Temperature' -u 'degree celsius'
  }
  
  define command{
     command_name    snmp_ups_load
     command_line    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 'Output Load' -u '%'
  }
  
  define command{
     command_name    snmp_ups_current
     command_line    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 'Ampere 3~'
  }
  
  define command{
     command_name    snmp_ups_volt
     command_line    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 'Volt 3~'
  }
  
  define command{
     command_name    snmp_ups_freq
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.2.0 -l 'Output Frequency' -u 'Herz'
  }

Host ans services configuration

After adding the check commands we can start to use them with a host. Over here is an example for a host with services.

 #### HOST ####
 define host{
   use                     generic-host
   host_name               apc-smart-ups
   alias                   apc-smart-ups
   address                 172.16.10.90
 }

 #### SERVICES ####
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Environment-Temperature
   check_command                   snmp_ups_envtemp!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_stat!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_capa!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_freq!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_volt!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_current!public
   }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_load!public
 }

~~Sebastian Broekhoven feedback and tips on this page would be nice :)

Personal tools