Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Description: check_ups_snmp is a Nagios plugin to check by snmp a ups status with CS121 and other snmp card adapters. With performance data
Current Version
1.0
Last Release Date
2014-04-09
Owner
Daniel Dueñas
Website
http://blog.dduenasd.com.es/?p=4
Download URL
https://github.com/dduenasd/check_ups_snmp
License
GPL
Compatible With
2013, Daniel Dueñas Domingo (mail:[email protected])
Instalation:
requirements: - Net-SNMP
This plugin is a linux script, to install, copy it into the path of nagios plugins (usually in / usr / local / nagios / libexec ) and define a command in nagios command.cfg file.
Definition example in command.cfg nagios :
define command { command_name check_ups_snmp command_line $ USER1 $ / $ HOSTADDRESS check_ups_snmp.sh -H $ ARG1 $ -p -C $ ARG2 $ - w $ ARG3 $ - c $ ARG4 $ register 1 }
Once done , we must define a service for each parameter to be monitored in the service configuration file :
define service { host_name UPS_1 service_description ups_alarm use ups_template check_command check_ups_snmp ! snmp ! ups_alarm 0, 0, ! -d / usr / local / nagios / libexec / mibs register 1 }
For correct use of ups_alarm option, including mibs in the /mibs directory are needed , they are needed to correctly interpret of the alarms that can give for snmp ups , in this case , as seen in the example of defining service , copy mibs files on path '/usr/local/nagios/libexec/mibs' but could be anywhere else .
Pnp4nagios graphics templates are included, for install it, you must copy the file check_ups_snmp.php in '/share/templates' in pnp4nagios home directory.
Use: ./check_ups_snmp.sh -H <ip_address> -p <option>
Example: ./check_ups_snmp.sh -H 10.40.80.1 -p battery_temp -w 25 -c 40
OPTIONS: -H|--hostname) Sets the hostname. Default is: localhost -C|--community) Sets the snmp read community ('public' by default) -p|--parameter) Sets the parameter you want monitorize (see available parameters below) -h|--help) Show help -c|--critical critical value -w|--warning warning value -d|--dir mibs files directory ('./mibs' by default) PARAMETERS:
ups_alarm:The present number of active alarm conditions. If number is zero, status is OK, if > 0 the status is CRITICAL. If an alarm is present, the plugin show the upsAlarmDescr and upsAlarmTime, if you want show the text description of the oid upsAlarmDescr, you must define the directory of the mibs files with -d Option (./mibs by default)
battery_temp :The ambient temperature at or near the UPS Battery casing. Warninig and critical values requiered
output_load :The percentage of the UPS power capacity presently being used on this output line, i.e., the greater of the percent load of true power capacity and the percent load of VA. Warning and critical requiered.
input_voltage :The magnitude of the present input voltage in the input lines. normal value, interval warning and interval critical requiered Example: normal value is 400V, warning in 395-405 V interval and critical 390-410 V interval use: ./check_ups_snmp.sh -H 10.40.80.1 -p input_voltage -w 395:405 -c 390:400 in the example, normal value is 400V, warning in 395-405 V interval and critical 390-410 V interval
num_input_lines :The number of input lines utilized in this device. This variable indicates the number of rows in the input table, percent warning and critical no requiered.
num_output_lines :The number of output lines utilized in this device. This variable indicates the number of rows in the output table, warning and critical no requiered.
battery_status :The indication of the capacity remaining in the UPS system's batteries. A value of batteryNormal indicates that the remaining run-time is greater than upsConfigLowBattTime. A value of batteryLow indicates that the remaining battery run-time is less than or equal to upsConfigLowBattTime. A value of batteryDepleted indicates that the UPS will be unable to sustain the present load when and if the utility power is lost (including the possibility that the utility power is currently absent and the UPS is unable to sustain the output).warning and critical no requiered. No perfdata show.
battery_charge_remain: An estimate of the battery charge remaining expressed as a percent of full charge and minutes. Warning and critical required and refered to the percent of charge
Work very well!
[root@xxxx libexec]# ./check_ups_snmp.sh -H xxxxx -C xxxxxx -p ups_alarm CRITICAL - Such alarms present |'alarms'=Such I am getting above error and I checked in ups but no alarms and I removed logs also but no use. Can any one help me where i did mistake. Thanks in advance.
Hi, This is great, thanks so much. Works perfectly and gets loads of useful information.
You must be logged in to submit a review.
To:
From: