Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Jeff Manross

Last Release Date
2009-08-19
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
Hits
125993
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Jeff Manross
Sample Code for communication to APC UPS Via: SNMP / Link to Text File
After Weeks of searching....Finally

Source code in Text File - download

Hope it helps.
Jeff
Reviews (6)
This example is extremely useful, but the author doesn't seem to understand the crazy way the check_snmp plugin defines critical and warning ranges. For example, the latesttest_result SNMP value is 2 if failed, 1 if passed. The -c 2 flag means anything GREATER than 2 is critical, so a status of 2 passed, when it should not. The correct syntax should be -c 1.

This also affects the snmp_ups_stat check for the main battery status, which I believe should probably use a -c 2 flag, with no warning flag based on this description in the MIB:

"The status of the ups batteries. A batteryLow(3) value indicates the UPS will be unable to sustain the current load, and its services will be lost if power is not restored. The amount of run time in reserve at the time of low battery can be configured by the upsAdvConfigLowBatteryRunTime. A batteryInFaultCondition(4)value indicates that a battery installed has an internal error condition."

It's very unfortunate that the check_snmp works this way, since it makes reading and writing these checks very counter intuitive.

I want to stress that I'm very grateful for all the work the author of this check - it's saved me a huge amount of time, despite these small but important mistakes.
Very easy to setup. Also, I would like to know what is the mean of "UPS Status". Is it possible to get "Email/SMS" alerts for below states.

ALERT Report(Email/SMS) if UPS is on Battery Power
ALERT Report(Email/SMS) if UPS is on AC Mains Power

Presently, my "UPS Status" STATE shows "SNMP OK-Main UPS Status 2". What does it mean?
bykibosh, October 11, 2012
I am unable to find net-snmp-5.3.3.pre1.tar.gz on sourceforge. All the net-snmp projects hosted on sourceforge seem to have an .exe file extension. Please advise. Thank you.
bymatthew, July 24, 2012
Working well with our Smart-UPS RT 5000 XL, thank you very much for submitting your work.
bydevcon, April 29, 2012
1 of 1 people found this review helpful
the only working solution without any additional dameon software, works great for APC network managment cards.

Just one small typo:

"Output Voltage" should be "Input Voltage" on the following command definition:

# '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\'
}
byNapsty, March 29, 2012
2 of 2 people found this review helpful
Thanks for putting together this list.
Although this isn't a plugin but a list of OID's it was actually more helpful than other APC plugins lying around here (most of them don't work or need addditional software).