This perl script queries an UM_LINK unit via SNMP and grabs some useful information in order to determine the status of a MGE UPS COMET S31 to send it to Nagios.
check_snmp_mgeups.pl - grabbing useful information from a UM_LINK unit
Copyright (C) 2005-2007 Nacho Barrientos Arias
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Full text: http://www.gnu.org/copyleft/gpl.html
Please execute the script in your preferred shell before use it with
Nagios in order to test if the OIDs are OK, a message will be printed
if errors are found.
Usage: check_snmp_mgeups -H hostname [-C community]
Options:
-H Hostname or IP address
-C Community (default is public)
foo@bar:~$ ./check_snmp_mgeups -H 192.168.0.151
Status is OK - No problems.
Other:
foo@bar:~$ ./check_snmp_mgeups -H 192.168.0.151
Status is CRITICAL - AC input fail.
Henk-Jan Agteresch reported that this plugin doesn't work properly with Nagios 2.x and wrote a C wrapper to temporary fix this issue.
Brecht Samyn submitted an improved version that works in a good shape
with Nagios 2.x, thank you Brecht!
Feedback is indeedly welcome in order to make this release official.
0.1b (07/01/08)
Based on check_snmp_apcups.pl from Altinity Limited (GPL License)
Main branch was written by Nacho Barrientos, see section
#6 to get information about other authors and contributors.
Thanks to José Beites and EBHI, who gave me access to a MGE COMET S31 UPS
and a UM-LINK unit.