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

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

Moderators: Developers, Moderators

lingping
Posts: 12
Joined: Wed Mar 19, 2008 7:34 pm
Location: China

Post by lingping »

Sorry, you of the meaning be to say, if the device has already supported snmp, have no necessity usage apcdaemon?

Thank you.

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

Post by BSOD2600 »

Correct. I already stated this last month.
cyr0n_k0r
Posts: 38
Joined: Thu Apr 24, 2008 12:02 pm

Post by cyr0n_k0r »

do you have a recommended script that can be used for management cards that already support SNMP?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you search the script forum for APC, you'll find many (if not most) which utilize SNMP.
cyr0n_k0r
Posts: 38
Joined: Thu Apr 24, 2008 12:02 pm

Post by cyr0n_k0r »

I have searched. After trying 3 different kinds, all of which are ugly, only half work, or not what I want, I have managed to find this:

http://forums.cacti.net/viewtopic.php?t ... s&start=15

But I'm not quite sure exactly how to get it setup and running.
I've imported the XML file, but I don't know what needs to be done beyond that.

Which leads to my initial complaint that none of these things ever include readme's or documentation. People just assume everyone has an expert level of knowledge on this stuff.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

cyr0n_k0r wrote:I have searched. After trying 3 different kinds, all of which are ugly, only half work, or not what I want, I have managed to find this:
Sounds like an opportunity for you to learn how to make an XML script for cacti then. There are some good guides in the documentation site (link above forum).
cyr0n_k0r wrote:Which leads to my initial complaint that none of these things ever include readme's or documentation. People just assume everyone has an expert level of knowledge on this stuff.
Agreed. You should post your questions regarding that script, in that thread. For most xml scripts, you basically import the xml file (which in turn should import the data input method, graph template(s), data templates, and any needed CDEF's).
westcoastirl
Posts: 6
Joined: Mon Oct 20, 2008 4:08 am

Post by westcoastirl »

hey,

got referred to this script/post from the other apcupsd script post.

i have apcuspd running on ubuntu and have set NIS in the conf file.

'apcaccess status' command gives all the normal information.

i followed the instructions but get stuck testing the sqript.

i type in 'php query_apcupsd 127.0.0.1 3551'

and the result is:

Code: Select all



Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/share/cacti/site/scripts/query_apcupsd.php on line 26

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

Post by BSOD2600 »

Did you update the ACPACCESS_PATH variable to reflect the correct path?
westcoastirl
Posts: 6
Joined: Mon Oct 20, 2008 4:08 am

Post by westcoastirl »

i thought i had entered it correctly, but on further inspection i mixed up back slashes with forward slashes.

works perfectly now.

thanks a mill.

keep up the good work.
tamias
Posts: 49
Joined: Thu Oct 16, 2008 7:12 am

Post by tamias »

khaytsus wrote:I've modified mine to split out the battery charge and leave the rest, three separate graphs now. Plus I removed a few my BackUPS doesn't support that the SmartUPS do.
Easy to do, all I did was duplicate the existing one and remove some items. :)
Please , where and which files need to fix to get this results ?
Regards, Michail A.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Just edit the graph templates and remove the data you don't need. Make a copy of the original and append on the model of your UPS.
tamias
Posts: 49
Joined: Thu Oct 16, 2008 7:12 am

Post by tamias »

BSOD2600 wrote:Just edit the graph templates and remove the data you don't need. Make a copy of the original and append on the model of your UPS.
Thank you, I did so, and all works well.
I have a question: is it possible to make that the value of Graph ID and Data Sources ID / RRD file have the same value? I have for this graph: Graph ID=37 and Data Sources ID=40 / localhost_load_pct_40.rrd,
it would be more correct for example 40/40/40 .
Regards, Michail A.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Umm possibly via some database hacking, etc. At any rate, its above any beyond the topic of this thread.
kcmjr
Posts: 2
Joined: Mon Feb 23, 2009 12:43 pm

Why NIS?

Post by kcmjr »

BSOD2600 wrote:Yes, both apcdaemon and NIS must be enabled on the HOST, which you want to collect the data from.
I'm curious why NIS must be enabled. We don't use NIS for anything here, and my APC UPS's don't have the abilty to use it.

I'd love to be able to use these composite graphs but as of yet I can't get them to work. I've been able to get other APC scripts and graphs to work just fine.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

NIS is the only way apcdaemon can query the status of another APC device over the network via the 'apcaccess status' command. The reason I created this script is for older APC devices which don't provide SNMP support -- if yours does, you should be using a different set of templates/scripts.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests