RRAs definition

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
CoolTom
Posts: 7
Joined: Wed May 24, 2006 8:56 am

RRAs definition

Post by CoolTom »

hi,
pleae is possible explain how to define RRAs correctly?
I read this forum and i check default RRA definition in MANAGEMENT -- DATA SOURCES -- RRAs
is this settings correct (especially "ROWs" and "TIMESPAN")?

I start poller every 2minutes.
I need NO Average, so I set:
-Consolidation Functions: AVERAGE
-X-FILES: 0.5
-Steps: 1

HOURLY:
Rows: 30 ( [(60minutes/2)=CDP per Hour] * 1hour)
Timespan: 3600 (= seconds in hour)

DAILY:
Rows: 720 ( [(60minutes/2)=CDP per Hour] * 24hours)
Timespan: 86400 (= seconds in day)

WEEKLY:
Rows: 5040 ( [(60minutes/2)=CDP per Hour] * 24hours * 7days)
Timespan: 604800 (= seconds in week)

MONTHLY:
Rows: 22320 ( [(60minutes/2)=CDP per Hour] * 24hours * 31days)
Timespan: 2628000 (= seconds in month)

YEARLY:
Rows: 262800 ( [(60minutes/2)=CDP per Hour] * 24hours * 365days)
Timespan: 31536000 (= seconds in year)

is it correct?
becouse for ex in default cacti Daily (5 minutes Average) is:
Consolidation Functions: ALL
Rows: 600 ( [(60minutes/5)=CDP per Hour] * 24hour == 288???)
Timespan: 3600 (= seconds in hour == ok)

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

Post by gandalf »

Very recently, I had a quite similar discussion on that. Please follow the rrdtool stuff of my signature to get some insight. You'll find a resize script in there that may help adjusting already defined rra's
And you'll find some arguments, why I (personally) do not like doing so. I already had LOTS of discussions about that. But your choice may vary, of course.

Unfortunately, IMHO the current way cacti defines rra parameters together with graphing timespan is not a very lucky way.
rrdtool way of defining rra's
All parms of your example are rra parms, except for timespan. A single rra keeps all data belonging to the same resolution. As you want to define 5 min intervals only, there's a need for a single rra only. A second, third, ... rra is required for next consolidation (AKA "averaging") levels only.
cacti
cacti allows for multiple graphs using different timespans when clicking on the "default" graph. Handling is determined by the rra definitions associated with the data template used. This in turn references the rra definitions. But cacti needs only the different timespan settings of the rra definitions. So I made a (really ugly) workaround to fake this. See links.

Some more links to read:
http://forums.cacti.net/viewtopic.php?t=14040
http://forums.cacti.net/viewtopic.php?t=13476
http://forums.cacti.net/viewtopic.php?t=13846

Reinhard
CoolTom
Posts: 7
Joined: Wed May 24, 2006 8:56 am

Post by CoolTom »

Thanks LVM for your answer!
I read links, but please can u help me more?

Resize
I have some data created, but its not problem delete it and start again. So i dont need resize.

graphing timespan
ok, so i set this value in seconds like how many time interval cacti will show it graphs which use this RRA (nothing to do with RRAs definition)
HOURLY: 3600 (= seconds in hour)
DAILY: 86400 (= seconds in day)
WEEKLY: 604800 (= seconds in week)
MONTHLY: 2628000 (= seconds in month) - 31536000 sec in 365 days / 12 months
YEARLY: 31536000 (= seconds in year)
or keep default cacti values? They count month like 40days?

2 minutes resolution - bad idea
so minuses are: it take some space, it take long time and CPU for graphing. But there will be just few graphs so i thing it will be no problem ...

Please can you tell me how can i define this RRAs? Not 5 but 2 minutes resolution and add one on the begining (before DAILY) - HOURLY.

So, i need change only first - HOURLY and the rest will cacti count from this firs = i dont need change it? I will get that 2 minutes resolution in WEEKLY, MONTHLY, YEARLY with ZOOM function (2 minutes resolution will be in database, but it will show resolution for fit "in graph picture")?

Start poller every 2 minutes and:

RRA definitions

time interval: Consolidation Functions/Steps/Rows (timespan is upper)

HOURLY: AVARAGE/1/30
DAILY: AVARAGE/1/600
WEEKLY: AVARAGE/1/700
MONTHLY: AVARAGE/1/775
YEARLY: AVARAGE/1/797

I m realy sorry for this question, i can see, is very difficult answering still same question from people like me :oops: .
Thanks for help Tom
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

CoolTom wrote:Thanks LVM for your answer!
I read links, but please can u help me more?

Resize
I have some data created, but its not problem delete it and start again. So i dont need resize.
Fine, then. Saves you some work.
graphing timespan
ok, so i set this value in seconds like how many time interval cacti will show it graphs which use this RRA (nothing to do with RRAs definition)
HOURLY: 3600 (= seconds in hour)
DAILY: 86400 (= seconds in day)
WEEKLY: 604800 (= seconds in week)
MONTHLY: 2628000 (= seconds in month) - 31536000 sec in 365 days / 12 months
YEARLY: 31536000 (= seconds in year)
or keep default cacti values? They count month like 40days?
This makes sense for the timespans. The monthly thingy depends, but things won't differ that much ... Personally, I'd take exactly 30 days, but you may change this.
It is possible to change the timespans at ANY time without worrying about the rrd's as it's a "non-rrd" parameter.
2 minutes resolution - bad idea
so minuses are: it take some space, it take long time and CPU for graphing. But there will be just few graphs so i thing it will be no problem ...
Other users report to poll every minute. Please PM TheWitness for some resources needed for that.
...I will get that 2 minutes resolution in WEEKLY, MONTHLY, YEARLY with ZOOM function (2 minutes resolution will be in database, but it will show resolution for fit "in graph picture")?
The resolution of the graphs depends on width (in pixels) and number of data points to be graphed. If you use 500 pixels width, you may graph up to 500 * 2 min = 1000 min = 16h 40 min without consolidation.
RRA definitions

time interval: Consolidation Functions/Steps/Rows (timespan is upper)

HOURLY: AVARAGE/1/30
DAILY: AVARAGE/1/600
WEEKLY: AVARAGE/1/700
MONTHLY: AVARAGE/1/775
YEARLY: AVARAGE/1/797
You missed some other definition to be changed in all rra's: the step value (per Data Template = per rrd file)

Code: Select all

       --step│-s step (default: 300 seconds)
               Specifies the base interval in seconds with which data will be fed into the RRD.
(in your case 120) and the heartbeat

Code: Select all

               heartbeat defines the maximum number of seconds that may pass between two updates of this data source
               before the value of the data source is assumed to be *UNKNOWN*.
(in your case 240)
Current settings are

Code: Select all

Daily (5 Minute Average)   	 1  	 600  	 86400
Weekly (30 Minute Average) 	 6 	  700 	 604800
Monthly (2 Hour Average) 	  24 	  775 	2678400
Yearly (1 Day Average) 	   288 	  797   33053184
Change this to

Code: Select all

Hourly (2 Minute Average)   	 1  	 720  	 3600
Daily (10 Minute Average)   	 5  	1008  	86400
Weekly (30 Minute Average) 	 15 	10080 	604800
Monthly (2 Hour Average) 	   60 	 7560   2678400
Yearly (1 Day Average) 	    720 	  730  33053184
These rra's hold values for the following amount of time
  • Hourly: holds un-consolidated data for one day = 24 * 60/(2 min interval) = 720 data points
  • Daily: holds consolidated (10 min = 5 data points) data for one week = 7 * 24 * 60min / (5 * 2 min) = 1008 consolidated data points
  • Weekly: holds consolidated (30 min = 15 data points) data for one month = 30 * 7 * 24 * 60min / (15 * 2 min) = 10080 consolidated data points
  • Monthly: holds consolidated (2 h = 120 min = 60 data points) data for three months = 3* 30* 7 * 24 * 60min / (60 * 2 min) = 7560 consolidated data points
  • Yearly: holds consolidated (1d = 1440 min = 720 data points) data for two years = 2 * 365 * 24 * 60min / (720 * 2 min) = 730 consolidated data points
But I suppose you do not want consolidation at all, am I right?
To be correct, this can't be done with current cacti, sorry. This is because timespan and rra definitions are put together. And if you do not want consolidation, this means that you only want 1 rra (all data points of the same resolution = consolidation level are put into one single rra. If you do not need consolidation, there will be one rra only). And if there is only one rra, (currently) there is only one timespan. Is this clear?

So lets again try some ugly workaround (perhaps not that ugly as the first one described in my "resize" howto). Lets create 4 fake rra's to get those timespans you're interested in. I did not try what I tell you now, so it may fail:

Code: Select all

Hourly (2 Minute Average)   	 1   525600  	 3600
Daily (10 Minute Average)   	 5  	   1  	86400
Weekly (30 Minute Average) 	 15 	    1 	604800
Monthly (2 Hour Average) 	   60 	    1   2678400
Yearly (1 Day Average) 	    720 	    1  33053184
These rra's hold values for the following amount of time
  • Hourly: holds un-consolidated data for two years = 2*365*24 * 60/(2 min interval) = 525600 data points
  • Daily: holds consolidated (10 min = 5 data points) data (faked for timespan settings only, so hold 1 data point only) = 1 consolidated data point
  • Weekly: holds consolidated (30 min = 15 data points) data (faked for timespan settings, so hold 1 data point only) = 1 consolidated data point
  • Monthly: holds consolidated (2 h = 120 min = 60 data points) data (faked for timespan settings, so hold 1 data point only) = 1 consolidated data point
  • Yearly: holds consolidated (1d = 1440 min = 720 data points) data (faked for timespan settings, so hold 1 data point only) = 1 consolidated data point
Please report you findings.

Attention
When importing templates, you will import rra settings as well. You can't suppress that. So it may be a good idea, to export your rra settings to some file and re-import them after importing other Templates.

Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests