UPS Smart APC templates

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

Moderators: Developers, Moderators

WiredWorm
Posts: 7
Joined: Thu Jun 02, 2011 7:23 am

Re: UPS Smart APC templates

Post by WiredWorm »

Hi,

I'm new to the world of Cacti and I have to say i've been really impressed with it's capabilities so far.

I've managed to get all of the APC templates working with the exception of the one that monitors UPS Temperature.

The data appears to be collected but when the rrdtool generates the graph it must be failing because theres no graph displayed in the UI. I've used the RRDTool to diagnose the problem and it's something to do with the CF setting?

Running the 'rrdtool' command with a CF value of LAST causes the error 'ERROR: the RRD does not contain an RRA matching the chosen CF'. Whilst doing the same command with a CF of AVERAGE works just fine.

Obviously I want it to display the last value and not an average so how do I go about fixing this? Is it something I need to tweak in the data source configuration?

Sorry if this is a n00b question. I'm still learning. ;)

Thanks

Pete

Edit: I think I figured it out. Went into RRAs under Data Sources and added LAST for each of them. I then deleted the data source which had the issue and recreated both the datasource and the graph.
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: UPS Smart APC templates

Post by timi »

groovee
Posts: 4
Joined: Fri Sep 12, 2008 3:46 am

Re: UPS Smart APC templates

Post by groovee »

Hello,

I'm trying to import Timi's template into cacti Version 0.8.7e but I'm getting an error:

Error: XML: Hash version does not exist.

Should I upgrade to the newest version to get it operate or there is something else to do?

Regards,
Kacper
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: UPS Smart APC templates

Post by timi »

you should have at least cacti version g to be able to import the template.
groovee
Posts: 4
Joined: Fri Sep 12, 2008 3:46 am

Re: UPS Smart APC templates

Post by groovee »

Thank You for such quick reply!

I've upgraded to 0.8.7h and it works.

Very nice template!
ZaphoidPA
Posts: 1
Joined: Mon Apr 08, 2013 12:24 am

Re: UPS Smart APC templates

Post by ZaphoidPA »

I tried importing these templates into a 0.8.8 install of Cacti, and got the following error:

Error: XML: Cacti version does not exist.

...and all labels in the templates area are blank.

Are there some tweaks that need to be made to the template for it to work in 0.8.8?..

Thanks,
Richard.
NewJoiner
Posts: 11
Joined: Fri Jan 18, 2013 4:51 am

Re: UPS Smart APC templates

Post by NewJoiner »

Hello,

I have a AP9619 card and using the XML file that imported without any errors.
However all graphs are being displayed expect the temperature one!!

If I run that from the CLI :

/usr/bin/snmpget -v2c -c {com} {IP} .1.3.6.1.4.1.318.1.1.1.2.2.2.0
SNMPv2-SMI::enterprises.318.1.1.1.2.2.2.0 = Gauge32: 22

So that works well.

Cacti Version 0.8.8a
Cacti OS unix
SNMP Version NET-SNMP version: 5.7.2
RRDTool Version RRDTool 1.4.x

What can I do?

Chrs
Attachments
ups.png
ups.png (94.3 KiB) Viewed 6659 times
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: UPS Smart APC templates

Post by timi »

try to put U in min and max values ...

did you make the graph template ?

enable debug and see waht comes out ...
NewJoiner
Posts: 11
Joined: Fri Jan 18, 2013 4:51 am

Re: UPS Smart APC templates

Post by NewJoiner »

Just changed the values to U.
Thanks for the tip and now looking to see if the temperature graph is being generated.

UPDATE (No joy still no graph for temps)

I am using the cacti_host_template_apc_smart_ups_14.zip as XML template.


RRDTool Command:

/{path}/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='UPS card - Battery Temp' \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='C' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/{path}/rra/ups_card_temp_1537.rrd":'temp':LAST \
AREA:a#8D85F3FF:"Temp" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:MIN:"Min\:%8.2lf %s" \
GPRINT:a:MAX:"Max\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF

How to fix that ?

filename = "/{path}/cacti/rra/ups_card_temp_1537.rrd"
rrd_version = "0003"
step = 300
last_update = 1393947054
header_size = 1888
ds[temp].index = 0
ds[temp].type = "GAUGE"
ds[temp].minimal_heartbeat = 600
ds[temp].min = 0.0000000000e+00
ds[temp].max = NaN
ds[temp].last_ds = "23"
ds[temp].value = 1.2420000000e+03
ds[temp].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].cur_row = 45
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].cur_row = 646
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 0.0000000000e+00
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].cur_row = 705
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 4.0600000000e+02
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].cur_row = 74
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 4.0666700000e+03
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].cur_row = 111
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].cur_row = 141
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = -inf
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 775
rra[6].cur_row = 582
rra[6].pdp_per_row = 24
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = 2.3000000000e+01
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 797
rra[7].cur_row = 744
rra[7].pdp_per_row = 288
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 2.3000000000e+01
rra[7].cdp_prep[0].unknown_datapoints = 0

Chrs

See rrd file (that hold the correct values)
Attachments
temp.xml.gz
(37.59 KiB) Downloaded 381 times
NewJoiner
Posts: 11
Joined: Fri Jan 18, 2013 4:51 am

Re: UPS Smart APC templates

Post by NewJoiner »

Anyone knows how to get it fixed?
jorgus
Posts: 2
Joined: Thu Mar 20, 2014 12:39 pm

Re: UPS Smart APC templates

Post by jorgus »

Could fix temperature template?

I have a Smart-UPS RT 7500 XL
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: UPS Smart APC templates

Post by timi »

sorry, I dont have a temp sensor on my upses ...
NewJoiner
Posts: 11
Joined: Fri Jan 18, 2013 4:51 am

Re: UPS Smart APC templates

Post by NewJoiner »

It looks like the database holds all the correct data but the template is not producing the temp graph somehow.
I hope someone with some more knowledge than me of Cacti / rrd can fix this part. Would be nice to have the temp also in the same scripts...

For now I will try to setup a separate php script to read out the rrd database.

If someone even has the chance to get it fixed that would be great..

Chrs
jorgus
Posts: 2
Joined: Thu Mar 20, 2014 12:39 pm

Re: UPS Smart APC templates

Post by jorgus »

I mean the temperature of the battery, the APC Smart UPS - Battery Temp..

Let's see if I get to have time to research that. :cry: :cry: :cry:
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: UPS Smart APC templates

Post by timi »

if you could give me snmp read access to one of the upsese that has a temp sensor, maybe I could try and fix it ....
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest