Problems with check_apc_ups.pl

Friedman, Bruce L. Bruce.L.Friedman at snapon.com
Wed Mar 3 16:32:25 CET 2004


Bruce,

I turned warnings off in the file I passed to you - also the "use lib
utils.pm" was commented out.  Please check that you are using the new
check_apc_ups.pl file.  Also, you should keep the line "require
'/usr/lib/nagios/plugins/utils.pm'" assuming that is the location of
utils.pm - or adjust it to the correct location of utils.pm from the plugin
distribution.

I found debugging the script was helped by directly running the snmpget
command as follows:

snmpget -v 1 -c public ups.hostname.com .1.3.6.1.4.1.318.1.1.1.7.2.3.0

where you substitute your community name for "public" and your hostname for
"ups.hostname.com".  This OID is for upsAdvTestDiagnosticsResults - a value
of 1 indicates OK.

If you do not get a reasonable value for the above snmp command then you
have a problem with either:
a) the snmp toolkit installation
b) the configuration of your APC UPS (i.e. community name/IP address
allowed)
c) other network configuration problems

I suspect the problem you are experiencing may be found this way.

regards, 
Bruce Friedman 
Snap-on, Inc. 
eTechnician System Administrator 
bruce.l.friedman at snapon.com 
(847) 478-7262 (voice) 

-----Original Message-----
From: Gilbert, Bruce [mailto:bruce.gilbert at tmgus.mosaic.com]
Sent: Tuesday, March 02, 2004 4:29 PM
To: 'Friedman, Bruce L.'
Cc: 'nagios-users at lists.sourceforge.net'
Subject: RE: [Nagios-users] Problems with check_apc_ups.pl


Bruce,

First, thanks for the help.

When running your version I get the following error -

./check_apc_ups.pl -H 172.23.0.27
Can't locate utils.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0) at
./check_apc_ups.pl line 20


I had that same problem with the included script that came with the plugins.
Changing the plugin version or yours with the following allows the script to
run, but both give -

Status: unknown, Batt Cap(%): unknown, Batt Time: unknown, Batt status:
unknown, Batt temp(F): unknown, Batt repl: unknown, Output load (%):
unknown, Diag result: unknown, I-Freq: unknown, I-V,Max,Min: unknown,
unknown, unknown, O-Freq: unknown, O-V: unknown,

# use lib utils.pm;
#require '/usr/lib/nagios/plugins/utils.pm';
use lib "/usr/local/nagios/libexec/";
use utils qw(%ERRORS &print_revision &support &usage);

If you have any other suggestions, I would appreciate it. I am running
net-snmp-5.0.9. Would upgrading perhaps alleviate the problem?





-----Original Message-----
From: Friedman, Bruce L. [mailto:Bruce.L.Friedman at snapon.com] 
Sent: Tuesday, March 02, 2004 1:03 PM
To: 'Gilbert, Bruce'
Subject: RE: [Nagios-users] Problems with check_apc_ups.pl


Bruce, 
I have made numerous changes to check_apc_ups.pl to get it to work.  Please
try out the attached file and let me know if it works for you.  I am using
net-snmp-5.1-2.1
regards, 
Bruce Friedman 
Snap-on, Inc. 
eTechnician System Administrator 
bruce.l.friedman at snapon.com 
(847) 478-7262 (voice) 
-----Original Message----- 
From: Gilbert, Bruce [mailto:bruce.gilbert at tmgus.mosaic.com] 
Sent: Tuesday, March 02, 2004 11:49 AM 
To: 'nagios-users at lists.sourceforge.net' 
Subject: [Nagios-users] Problems with check_apc_ups.pl 


When running the check_apc_ups.pl plugin it returns the following messages -



./check_apc_ups.pl -H 172.23.0.27 
Output status: unknown | Rem time: unknown | Battery status: unknown | 
Battery temp(C): unknown | Battery repl: unknown | Output load (%): unknown 
| Diag result: unknown 
If I run ./check_snmp with the OID for battery temp or output status it 
returns OK. I've downloaded the APC MIBS, copied them to the appropriate 
folder, and even tried export MIBS=All. 
Is there anything else I am missing or any suggestions? 
Thanks, 
Bruce Gilbert 
Senior Network Manager 
Mosaic Sales Solutions 
  


------------------------------------------------------- 
SF.Net is sponsored by: Speed Start Your Linux Apps Now. 
Build and deploy apps & Web services for Linux with 
a free DVD software kit from IBM. Click Now! 
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click 
_______________________________________________ 
Nagios-users mailing list 
Nagios-users at lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/nagios-users 
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040303/38aea2af/attachment.html>


More information about the Users mailing list