UPDATED: APC Graphs plus Amperage used Calculation

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

Moderators: Developers, Moderators

rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

UPDATED: APC Graphs plus Amperage used Calculation

Post by rhettardo »

Hello.
I have attached some screen shots of the APC templates I have made. I am willing to share but not sure of if people will be interested since what I have to offer is already mostly available. Please review and let me know what you think. The only thing I can think of that I have left out is humidity on the temperature graph (I am using an AP9619 w/ Temp probe and not Temp+Humidity).

UPDATE 2009-07-28:

I've made a graph/cdef to estimate your AMP usage for people who need to know relatively how much power they are using in their rack. How I get this value is take the load value divide by the VA rating then divide by the input voltage.

The only problem with this is that in the CDEF I could not think of a way to dynamically get the VA rating of the UPS since its not listed in the Powetnet MIB. Therefore I manually added it into the CDEF.

CDEF: cdef=a,3,*,10,*,e,/

The 3 in the CDEF represents the VA rating on the UPS in thousands (i.e. 3 means this is an 3000VA ups).
Attachments
APC_graphs.zip
All graphs listed.
(206.89 KiB) Downloaded 261 times
How many estimated AMPs your UPS is using
How many estimated AMPs your UPS is using
amp.png (22.39 KiB) Viewed 6923 times
Input/Output Voltage and Input/Output Frequency
Input/Output Voltage and Input/Output Frequency
Picture 32.png (21.05 KiB) Viewed 11358 times
Battery charge %, Battery Status, Run time in Minutes, and Load %
Battery charge %, Battery Status, Run time in Minutes, and Load %
Picture 33.png (24.66 KiB) Viewed 11358 times
Temp probe and battery temperature (using cdef to convert deg. c to f. The 32 figure is due to the UPS not responding and the CDEF adding 32 for the temp conversion.  Unsure how to get around this since only the temp probe has the option of using deg. f i
Temp probe and battery temperature (using cdef to convert deg. c to f. The 32 figure is due to the UPS not responding and the CDEF adding 32 for the temp conversion. Unsure how to get around this since only the temp probe has the option of using deg. f i
Picture 34.png (19.75 KiB) Viewed 11358 times
Last edited by rhettardo on Mon Aug 03, 2009 12:15 pm, edited 4 times in total.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Here's the way the temp conversion CDEF's should be. Don't know why your graphs 'wouldn't respond' to them.
Attachments
SP32-20080805-201644.gif
SP32-20080805-201644.gif (9.63 KiB) Viewed 11351 times
SP32-20080805-201627.gif
SP32-20080805-201627.gif (9.39 KiB) Viewed 11352 times
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

Post by rhettardo »

streaker69,
Thanks for the info. I am quite new to all of this and trying to learn everything through osmosis.

Below is the cdef I made and currently use though I will try you example.
Attachments
my c to f cdef.
my c to f cdef.
c_to_f_cdef.png (20.75 KiB) Viewed 11345 times
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

I would be very interested in the templates. The ones that I currently use, lack some of the info yours have, such as the remaining runtime... which I have wanted for a long time, and haven't been able to find ones that could run on a windows box... I'm hoping these will :P If you could link them up, that would be great! Thank you.
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

I would be very interested in the templates. The ones that I currently use, lack some of the info yours have, such as the remaining runtime... which I have wanted for a long time, and haven't been able to find ones that could run on a windows box... I'm hoping these will :P If you could link them up, that would be great! Thank you.
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
variable
Posts: 5
Joined: Sun Aug 17, 2008 2:19 pm

Post by variable »

this would be useful here as well.
rafiso
Posts: 20
Joined: Sat Dec 10, 2005 8:54 pm

YEAHHH

Post by rafiso »

HI!

Yes please I want your files to try them on my APC 1400 !!!

Thanks you to share :)
rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

Post by rhettardo »

All,
Here is the host template. The only thing missing is a field for humidity since I personally dont have the humidity sensor. I can easily add this though.
Attachments
cacti_host_template_apc_ups.xml
APC UPS Host template
(78.64 KiB) Downloaded 592 times
rafiso
Posts: 20
Joined: Sat Dec 10, 2005 8:54 pm

Post by rafiso »

Ok great thanks !!!

I imported the xml file then I added a device with the Host Template "APC UPS". I can add the 3 graphs but there's no Associated Data Queries : "No associated data queries", so of course the graph will be empty :-/

Do you have any idea of the problem ? Thanks you again!! Nice work !
rafiso
Posts: 20
Joined: Sat Dec 10, 2005 8:54 pm

Post by rafiso »

Ok I have 2 graphs that seems to work. Can I change the temp in Celcius ? :=)

The graph APC Statistics is not working actually. In debug mode I have :

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="ups - APC Statistics" \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10: \
--font AXIS:6: \
--font LEGEND:8: \
--font UNIT:6: \
DEF:a="/var/www/html/website/protected/cacti/rra/ups_apc_charge_53.rrd":apc_charge:AVERAGE \
DEF:b="/var/www/html/website/protected/cacti/rra/ups_apc_charge_53.rrd":apc_charge:MAX \
DEF:c="/var/www/html/website/protected/cacti/rra/ups_apc_runtime_56.rrd":apc_runtime:AVERAGE \
DEF:d="/var/www/html/website/protected/cacti/rra/ups_apc_runtime_56.rrd":apc_runtime:MAX \
DEF:e="/var/www/html/website/protected/cacti/rra/ups_apc_load_55.rrd":apc_load:AVERAGE \
DEF:f="/var/www/html/website/protected/cacti/rra/ups_apc_load_55.rrd":apc_load:MAX \
DEF:g="/var/www/html/website/protected/cacti/rra/ups_apc_batt_status_54.rrd":apc_batt_status:LAST \
DEF:h="/var/www/html/website/protected/cacti/rra/ups_apc_batt_status_54.rrd":apc_batt_status:MAX \
CDEF:cdefg=c,6000,/ \
LINE1:a#2175D9FF:""  \
AREA:a#00A0C1FF:"Charge Percent"  \
GPRINT:a:LAST:"Current%8.2lf %s"  \
GPRINT:a:MIN:"Min%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average%8.2lf %s"  \
GPRINT:b:MAX:"Max%8.2lf %s\n"  \
LINE1:cdefg#FF5700FF:""  \
AREA:cdefg#EA8F00FF:"Runtime"  \
GPRINT:cdefg:LAST:"       Current%8.2lf %s"  \
GPRINT:cdefg:MIN:"Min%8.2lf %s"  \
GPRINT:cdefg:AVERAGE:"Average%8.2lf %s"  \
GPRINT:d:MAX:"Max%8.2lf %s\n"  \
LINE1:e#FF3932FF:""  \
AREA:e#FF410599:"Load"  \
GPRINT:e:LAST:"          Current%8.2lf %s"  \
GPRINT:e:MIN:"Min%8.2lf %s"  \
GPRINT:e:AVERAGE:"Average%8.2lf %s"  \
GPRINT:f:MAX:"Max%8.2lf %s\n"  \
LINE1:g#FAFD9EFF:"Battery Status"  \
GPRINT:g:LAST:"Current%8.2lf %s"  \
GPRINT:h:MIN:"Min%8.2lf %s"  \
GPRINT:h:MAX:"Max%8.2lf %s\n"  \
COMMENT:"-\n"  \
COMMENT:"Battery Status 1 = Good, 2 = Change" 

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

Post by rhettardo »

Here are the C versions. The only difference between these and the previous posted are the lack of a CDEF for converting C to F in the temp graph.
Attachments
cacti_host_template_apc_ups_c.xml
apc graph template using C for temp.
(77.17 KiB) Downloaded 721 times
rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

Post by rhettardo »

here is a screenshot of the cdef I currently have in place thanks to streaker69.
Attachments
c_to_f_cdef-.png
c_to_f_cdef-.png (30.06 KiB) Viewed 10189 times
rafiso
Posts: 20
Joined: Sat Dec 10, 2005 8:54 pm

Post by rafiso »

Okay it's working. I imported the xml and I changed the option at the bottom to import "Use custom RRA settings from the template". I'll let them run for a few hour now.

Thanks again amazing job!!
jug
Posts: 4
Joined: Fri Oct 10, 2008 5:20 am
Location: Italy

Template is not loading

Post by jug »

Hello,

maybe I'm doing something wrong but I tried to import your templates into cacti version 0.8.6[jk] and 0.8.7a and it always gives me a HASH error. With what version of Cacti did you export the Templates?
rhettardo
Posts: 37
Joined: Fri Jun 01, 2007 11:07 am

Post by rhettardo »

Jug,
I exported from .8.7b.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests