monitor apc ups using the check_apcupsd plug-in

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zul.shariff
Posts: 8
Joined: Mon Jan 24, 2011 10:48 am

monitor apc ups using the check_apcupsd plug-in

Post by zul.shariff »

I installed the check_apcupsd plug-in and did a test from the command line and I get no results or errors.
./check_apcupsd -c 50 -h <server name> -w 75 bcharge
I typed in the actual server name to which the UPS is connected via USB cable and we can monitor it using the APC application Powerchute Bussiness Edition.
I can ping the server by name from the NAGIOS server and I also tried using the ip address.
What am I missing?

Zul
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by mguthrie »

Try running:

Code: Select all

./check_apcupsd -h
To get the usage and plugin documentation.
zul.shariff
Posts: 8
Joined: Mon Jan 24, 2011 10:48 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by zul.shariff »

I got that and my command is correct as I don't get any error messages or the help screen.
I am just not getting any output.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by mguthrie »

./check_apcupsd -c 50 -h <server name> -w 75 bcharge
Usually a lower case -h denotes a call to the help output. Did you mean to use -H for the host name?
zul.shariff
Posts: 8
Joined: Mon Jan 24, 2011 10:48 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by zul.shariff »

For this it is the lowercase -h. It dose not like upper case H
[root@fsrvclonms1 libexec]# ./check_apcupsd -c 95 -H 10.6.0.7 -w 75 bcharge
./check_apcupsd: illegal option -- H
usage: check_apcupsd [-c critical_value] [-h hostname] [-p port]
[-w warning_value] <bcharge|itemp|loadpct|timeleft|linefail|battstat|status>
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by agriffin »

What's the output of running the following command?

Code: Select all

/sbin/apaccess status 10.6.0.7:3551
zul.shariff
Posts: 8
Joined: Mon Jan 24, 2011 10:48 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by zul.shariff »

[root@fsrvclonms1 libexec]# /sbin/apcaccess status 10.6.0.7:3551
FATAL ERROR in apcaccess.c at line 243
tcp_open: cannot connect to server 10.6.0.7 on port 3551.
ERR=Connection refused

The UPS is connected to the server (10.6.0.7) via a USB cable.
PowerchuteBusinessEdition is installed on the server and when I made the web connection to the UPS I noticed that it was connecting via port 3052.

So I tried the following:
[root@fsrvclonms1 libexec]# /sbin/apcaccess status 10.6.0.7:3052
and after about 5 minutes, I got this error
FATAL ERROR in apcaccess.c at line 251
zul.shariff
Posts: 8
Joined: Mon Jan 24, 2011 10:48 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by zul.shariff »

3551 is the apcupsd port so it's not going to work until I figure that out or try another plug-in that uses snmp.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: monitor apc ups using the check_apcupsd plug-in

Post by nscott »

Well on that note thats a TCP layer issue so it has to be a firewall of super daemon getting in the way somehwere. Are you able to test the port using nmap or telnet?
Nicholas Scott
Former Nagios employee
Locked