[HOWTO] RESIZE existing RRAs of existing RRDs

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

ooops.... thanks.
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

Now this maybe a silly question...

But does it make sense to remove the other RRAs? Is it even possible?

It seems it makes sense to do this. I have a number of charts that combine multiple RRDs and right now I'm getting 8 graphs for some reason. I guess it maybe because the RRAs don't match on the other week, month, year collections.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

No silly question. cacti will use the rra's related to the Data Template to define the number and timespan of those graphs. AND, theses rra's are taken when defining the rrd file
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

So can I just resize the other RRAs to 0?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I did not try on my own. But you may of course give it a go. Not sure on the behaviour of rrdtool when trying to consolidate data to some existing rra with size=0.
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

Ok -

I suppose it isn't really affecting anything, as in Cacti is eing smart enough not to use the consolidated RRAs for the week, month, year graphs after applying the new ZLVM data source templates?

Is there any reason to not apply these templates to the default templates, etc? I have several hundred data sources and it would seem least time consuming to apply at the "data template" level.

Best,
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

warenet wrote:Is there any reason to not apply these templates to the default templates, etc? I have several hundred data sources and it would seem least time consuming to apply at the "data template" level.

Best,
Yes, there is. This was my "private" way of handling this. It's only some little tweak to show the way. As I said above, I'd like to handle this in some other way. But this depends on the devs
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

I'm a bit confused by your response...

Is it "ok" to change the default template definitions, or even the default RRA definitions?

Or do you recommend against that.

I'm certainly open to a patch so that I don't have to delete/add the 0 length RRAs before creating new data sources :)
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

As a follow-up, I've switched to the "ZLVM" RRAs in Data Templates for a number of graphs.

I've also resized virtually all of my RRDs except for CPU and other metrics where long term high resolution isn't needed.

However, all my "yearly" graphs are failing.

I get this error in the httpd error logs:
ERROR: start (1111456902) should be less than end (1109950086)
[client 66.X.X.154] PHP Notice: Undefined index: traffic_out in /var/www/html/cacti/lib/graph_variables.php on line 305, referer: http://cacti.XXX.com/graph.php?local_gr ... rra_id=all
ERROR: start (1111456902) should be less than end (1109950086)
[client 66.xxx.xxx.154] PHP Notice: Undefined index: traffic_out in /var/www/html/cacti/lib/graph_variables.php on line 305, referer: http://cacti.XXX.com/graph.php?local_gr ... rra_id=all
ERROR: start (1111456902) should be less than end (1109950086)
Any hints or tips are appreciated.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please select the wrench next to the failing graph and post the whole rrdtool graph statement
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

/usr/local/rrdtool-1.2.12/bin/rrdtool graph - \
--imgformat=PNG \
--start=-33053184 \
--end=-34560000 \
--title="video bandwidth - Usage" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/ana_streams_traffic_out_930.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
AREA:cdefa#00CF00:"Outbound Bandwidth" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"0 Mbps 95th Percentile" \
COMMENT:"Bytes Transferred 0 bytes\n" \
HRULE:0#FF0000:"" \
COMMENT:"Updated\: Sat 08 Apr 09\:10\:03 PDT 2006"
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This statement seems to be ok (apart from the fact, that 95th Percentile and Totals are wrong). Please post a screenshot of the graph.
But be aware, that my last posts are only workarounds and no real solution. RRAs with 0 data points are not that usual. This may confuse the cacti-built-in calculations. But I don't suppose that a bug report against this will have great success.
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

Not sure what graph I can post?

Its failing to generate the graph at all.

?

TIA
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry for confusing you. As the rrdtool graph statement looks ok, I assumed that the Graph would display but the numbers were wrong. But several posts above, you posted the error from httpd's log, so this is now clear to me.
Obviously, some internal calculation went wrong. This is perhaps due to the "strange" nature of my RRAs. You may post this (with a reference to this post) at http://bugs.cacti.net stating what you're aiming at.
Sorry to not being of more help
Reinhard
warenet
Cacti User
Posts: 53
Joined: Mon Feb 10, 2003 12:00 pm
Location: Southern / CA
Contact:

Post by warenet »

Thanks -

I'll try that as well.

On another note - as you know I've changed the RRA description for certain data templates to yours.

I'm curious how I can now create new graphs. I've tried temporarily removing all the RRAs except the yearly one, but this doesn't seem to have the desired effect.

I wind up with a single RRA, but its a bit odd:

Code: Select all

rrd_version = "0003"
step = 300
last_update = 1145403992
ds[traffic_out].type = "ABSOLUTE"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+13
ds[traffic_out].last_ds = "UNKN"
ds[traffic_out].value = 0.0000000000e+00
ds[traffic_out].unknown_sec = 82
rra[0].cf = "AVERAGE"
rra[0].rows = 1
rra[0].pdp_per_row = 115200
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 16413
Any advice on this? I've got a bunch of graphs I want to create.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests