APC UPS Daemon (apcupsd) via NIS [v1.1 2007-12-17]

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I *think* its the UPS itself which does the internal calculation on runtime... I KNOW that my older 500 model's runtime is broken. During a power outage it'll drop significantly... then after a few weeks climb back up to something way too high.

I'm sure there is more info on the apcdaemon mailing list...
User avatar
pyth
Cacti User
Posts: 94
Joined: Thu Jan 31, 2008 8:45 am
Location: France, Grenoble
Contact:

Post by pyth »

its little hard to understand for me :D ,
but nis and apcupsd must be active on the cacti server, and the host that we want observe ?
Cacti : 0.8.7b
Architecture : 2.0
Settings : 0.3
Thold : 0.3.9
Monitor : 0.8.2
Update : 0.4
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yes, both apcdaemon and NIS must be enabled on the HOST, which you want to collect the data from.
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

Code: Select all

03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[34] ERROR: Empty result [192.168.20.31]: '/usr/local/src/cacti/scripts/check_ups.sh 192.168.20.31 3551'  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[33] DS[292] WARNING: Result from SCRIPT not valid. Partial Result: ...  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[33] ERROR: Empty result [192.168.11.8]: '/usr/local/src/cacti/scripts/check_ups.sh 192.168.11.8 3551'  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[32] DS[294] WARNING: Result from SCRIPT not valid. Partial Result: ...  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[32] ERROR: Empty result [192.168.11.9]: '/usr/bin/php /usr/local/src/cacti/scripts/query_apcupsd.php 192.168.11.9 3551'  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[32] DS[295] WARNING: Result from SCRIPT not valid. Partial Result: ...  
03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[32] ERROR: Empty result [192.168.11.9]: '/usr/bin/php /usr/local/src/cacti/scripts/query_apcupsd.php 192.168.11.9 3551'  
03/24/2008 07:15:08 PM - SPINE: Poller[0] Host[22] Hostname[192.168.12.251] ERROR: HOST EVENT: Host is DOWN Message: UDP: Ping timed out  
this my cacti log.

os:centos 5.0+cacti 0.8.7b

thanks.

lingping
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Any of you guys happen to run an APC EMU?

I'm trying to get a graph working that displays the overall average temperature from an EMU OID that returns multiple values ie:

snmpwalk -v 1 -c public xxx .1.3.6.1.4.1.318.1.1.10.4.2.3.1.5
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.0.1 = INTEGER: 21
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.0.2 = INTEGER: 29
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.1.1 = INTEGER: 24
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.1.2 = INTEGER: 24

But can't seem to work it out. I can graph a single OID no problems, but want to have a single graph that averages the total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

lingping: did you enable NIS on the apcdaemon? Manually run query_apcupsd.php 192.168.11.9 3551 and see if you get data.

ben_c: this script doesn't do emu; only apc daemon.
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Yeah, just wondering if anyone had hit that wall since the products are from the same vendor :)
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

BSOD2600 wrote:lingping: did you enable NIS on the apcdaemon? Manually run query_apcupsd.php 192.168.11.9 3551 and see if you get data.

ben_c: this script doesn't do emu; only apc daemon.
Excuse me, how start to perhaps install NIS and apcdaemon?

The my hand moves run query_apcupsd.php's 192.168.11.93551 results as follows:

Code: Select all

This need not realize:sh: /var/www/html/cacti/scripts/apcaccess: No such file or directory
The hint cans not find apcaccess, , apcaccess where can find out, does the system seem to have no this document or file?Where can download at?
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

ben_c wrote:Any of you guys happen to run an APC EMU?

I'm trying to get a graph working that displays the overall average temperature from an EMU OID that returns multiple values ie:

snmpwalk -v 1 -c public xxx .1.3.6.1.4.1.318.1.1.10.4.2.3.1.5
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.0.1 = INTEGER: 21
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.0.2 = INTEGER: 29
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.1.1 = INTEGER: 24
SNMPv2-SMI::enterprises.318.1.1.10.4.2.3.1.5.1.2 = INTEGER: 24

But can't seem to work it out. I can graph a single OID no problems, but want to have a single graph that averages the total.
Excuse me, , what is "EMU"?

can now also single OID normally shows, but I also hope to show many pieces in the single the chart according to,

include, input, output electric voltage, temperature, load, battery appearance etc.

Moreover, I can't show battery appearance now, the hint of cacti log:

Code: Select all

03/24/2008 07:20:10 PM - SPINE: Poller[0] Host[32] ERROR: Empty result [192.168.11.9]: '/usr/bin/php /usr/local/src/cacti/scripts/query_apcupsd.php 192.168.11.9 3551' 

03/24/2008 07:15:10 PM - SPINE: Poller[0] Host[33] ERROR: Empty result [192.168.11.8]: '/usr/local/src/cacti/scripts/check_ups.sh 192.168.11.8 3551' 
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

My equipments model number is:APC Smart-UPS VT
15 kVA

Does don't know that equipments support NIS or apcdaemon?
Sorry, my english isn't good and express not enough clear.
--------------------------------------------------
centos 5.0+php 5.1+mysql 5.0+http 2.2.3
cacti 0.8.7b+rrdtool 1.0.5+net-snmp 5.4.1
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) if your apc device supports SNMP natively, which I imagine a 15 kVA unit would, you should really be using the other APC scripts found on this forum. It's more faster and efficient than this one.

2) NIS is enabled in the apc daemon config file. Read the manual.
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

Thank you very much.
Sorry, my english isn't good and express not enough clear.
--------------------------------------------------
centos 5.0+php 5.1+mysql 5.0+http 2.2.3
cacti 0.8.7b+rrdtool 1.0.5+net-snmp 5.4.1
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

Code: Select all

[root@monitor scripts]# php query_apcupsd.php 192.168.101.9 3551
sh: /var/www/html/cacti/scriptsapcaccess: No such file or directory
Sorry, my english isn't good and express not enough clear.
--------------------------------------------------
centos 5.0+php 5.1+mysql 5.0+http 2.2.3
cacti 0.8.7b+rrdtool 1.0.5+net-snmp 5.4.1
lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

Code: Select all

04/23/2008 11:35:43 AM - SPINE: Poller[0] Host[67] ERROR: Empty result [192.168.101.8]: '/usr/bin/php /var/www/html/cacti/scripts/query_apcupsd.php 192.168.101.8 3551' 
Sorry, my english isn't good and express not enough clear.
--------------------------------------------------
centos 5.0+php 5.1+mysql 5.0+http 2.2.3
cacti 0.8.7b+rrdtool 1.0.5+net-snmp 5.4.1
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I'm curious why you're trying to use this script again on an APC device which already supports snmp?

Did you install apcdaemon and enabled NIS, as the instructions state?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests