95 percentitle with 5 minute for a month.

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Author
Message
dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

95 percentitle with 5 minute for a month.

#1 Post by dnguyen » Thu May 11, 2006 1:04 pm

Hi,

Righnow I can Viewing Graph (with 95 percentile)

Daily (5 Minute Average)
Weekly (30 Minute Average)
Monthly (2 Hour Average)
Yearly (1 Day Average)

Does anyone know how to change the Viewing Graph from:
Daily (5 Minute Average) to Monthly (5 Minute Average)

Thanks...David
Attachments
daily.doc
(49.5 KiB) Downloaded 1082 times

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#2 Post by rony » Thu May 11, 2006 1:24 pm

Have you modified your rra definitions to store 5 minute values for longer than 2 days?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#3 Post by dnguyen » Thu May 11, 2006 1:38 pm

Hi Rony,

Can you send me some more details, where is the rra definitions locate and how to modify.

Thanks...David

User avatar
rony
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

#4 Post by rony » Thu May 11, 2006 1:52 pm

LVM has some great post about what you need todo:

http://forums.cacti.net/viewtopic.php?t ... resize+rrd
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#5 Post by dnguyen » Wed May 31, 2006 1:57 pm

How do you create the rra for:
Monthly (5 Minute Average) --> Steps: 1 ; Rows: 11520; Timespan:2678400
is this right ?

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#6 Post by dnguyen » Fri Jun 02, 2006 1:47 pm

[quote="dnguyen"]

Hi Rony,

After I added Monthly (5 Minute Average) to the RRA:
[Monthly (5 Minute Average) --> 1 ; 11520; 2678400]

Daily (5 Minute Average)
Weekly (30 Minute Average)
Monthly (5 Minute Average)
Monthly (2 Hour Average)
Yearly (1 Day Average)

The problem is that these graphs are not displayed in Cacti anymore.
Do you know why ??? I need some help.

Thanks...David

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

#7 Post by gandalf » Fri Jun 02, 2006 2:35 pm

Adding a new rra has no effect on already existing rrd files. And when creating a new Data Template, you'll have to explicitely select your new rra definition to take effect. Personally, I recommend again reading my HowTo that rony pointed you at.
Reinhard

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#8 Post by dnguyen » Fri Jun 02, 2006 4:03 pm

Hi,

I followed the instructions on the "How to define very BIG rra without data loss", but I do not have any lucks.
I just send an email to lvm.
Please let me know.

Thanks...David

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

#9 Post by gandalf » Sat Jun 03, 2006 4:11 am

Oops, was the wrong link. Please see http://forums.cacti.net/viewtopic.php?t=11425 to change existing rra's to your liking. You should delete your new rra first to avoid problems. And if you want to change how data sources will be created in the future, you should edit the existing rra definitions. Please post the parameters you want to have set; I'll help you translating this into "rrd lingo"
Reinhard

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#10 Post by dnguyen » Mon Jun 05, 2006 9:48 am

Hi,

The RRAs is setup with:

Daily (5 Minute Average)
Weekly (30 Minute Average)
Monthly (2 Hour Average)
Yearly (1 Day Average)

I just want to add one more graph to the RRAs: Monthly (5 Minute Average)

I defining a new RRA --> Steps= 1 ; Rows=11520; Timespan=2678400
Defined the new data template, new graph template, modify data query to add graph template. (per "How to define very BIG rra without data loss")
I created the new graph but I did not see it.
Do I have to modify some files in order for the Monthly(5 Minute Average) to show up in the graph.

Please help!!!
Thanks....David

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

#11 Post by gandalf » Mon Jun 05, 2006 10:49 am

I'm afraid but I think you've got lost.
First, please understand what of those parameters provided by cacti's rra definitions are pur rra parms and what are cacti-only ones: timespan is a parameter used for cacti only, all other parms are pure rrdtool ones.
Second, understand how cacti works with those rra definitions: When setting up a data template, you'll have to associate ALL rra's you want to be created for the file. But they must be in ascending order with respect to "consolidation". That is, the "first" rra defines the basis (pure data without consolidation". The second one defines the first consolidation level. The steps give the number of primary data points to be consolidated. So it does not make sense to define another rra with the same interval size (5 min) twice.
Third, understand the legend, e.g. Monthly (2 hours average). This is pure text. It's your task to change the text so it fits to the timespan set for this rra. And, with respect to the famous zoom feature, this text has merely lost it's meaning. It's only helpful for the initial display to know about this rra's consolidation level. Now, let's see the solution:
Last, understand rrdtool's best fit algorithm:

Code: Select all

The data fetched from the RRA is then consolidated so that there is exactly one datapoint per pixel in the graph.
       If you do not take care yourself, RRDtool will expand the range slightly if necessary. Note, in that case the first
       and/or last pixel may very well become unknown!
This says, that even if you have 1000s of data points (e.g. one months worth of 5 min intervals), there are only 500 pixels to graph them! So rrdtool will even consolidate 5 min data points until the above (one consolidated data point per pixel) is reached.
More precise data is graphed only when zooming in!
Time range
[-s│--start time] [-e│--end time] [-S│--step seconds]

The start and end of the time series you would like to display, and which RRA the data should come from.
Defaults are: 1 day ago until now, with the best possible resolution. Start and end can be specified in several
formats, see AT-STYLE TIME SPECIFICATION and rrdgraph_examples. By default, rrdtool graph calculates the width
of one pixel in the time domain and tries to get data from an RRA with that resolution. With the step option
you can alter this behaviour. If you want rrdtool graph to get data at a one-hour resolution from the RRD, set
step to 3.600. Note: a step smaller than one pixel will silently be ignored.
So, rrdtool always uses "best fit" rra's.

To sum up: Blow up the first rra to the amount of data points needed. Keep your 4 rra's, no need for a fifth (unless you want to see five graphs when clicking on the default graph). And use the zoom feature to actually see the precise data

Reinhard

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#12 Post by dnguyen » Mon Jun 05, 2006 12:11 pm

Hello Reinhard,

Thank you very much for your help.
I have a lot of the customer want to see the graph Monthly (5 Minute Average) with 95 percentile, but not Monthly (2 Hour Average).
I do not need to see the Monthly (2 Hour Average), can I modify the script.
What can I do so I can see the graph Monthly (5 Minute Average)
I am very new to the Cacti and RRDTool, please give me some more details like which files and in which directory I will need to modify.

Again thank you for your help.

David

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

#13 Post by gandalf » Mon Jun 05, 2006 1:59 pm

Assuming, your graphs use 500 pixels. And lets take a month to contain 30 days. So for each day, there are 500 / 30 = 16 pixels per day. So there's not enough pixels for even a single data point per hour. So you would not notice any difference when viewing a monthly graph showing 1 hour averages compared to another one holding 5 min raw data. I did already try to explain that in my previous post.

But basically, I assume you do want to provide the ability to zoom into the graphs as deep as possible, that is: to 5 min resolution. So you may simply blow up the 5 min rra (which is the first one, not the third to hold data for one month. Computing:
an hour = 12 data points (at 5 min intervals)
a day = 24 * 12 = 288 data points
a month (roughly) = 40 * 24 * 12 = 11520 data points (covering 40 days)
subtracting the 600 rows that are already present, you should blow up by about 11,000 data points. Try this with an arbitrary rrd file and wait for 30-40 days to allow data filling up. Then simply zoom into the Monthly (2 hours average) graphs to find automagically resolution of 5 mins.

Of course, you may change the name of the existing monthly rra to Monthly (5 min resolution) if that makes your users happier

Reinhard

dnguyen
Posts: 9
Joined: Mon May 08, 2006 10:52 am

#14 Post by dnguyen » Tue Jun 06, 2006 10:41 am

Hi,

The Round Robin Archives is:
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

Per your instructions I should change to:

Daily (5 Minute Average)] 1 - 11000 - 86400
Weekly (30 Minute Average) 6 - 700 - 604800
Monthly (5 Minute Average) 24 - 775 - 2678400
Yearly (1 day Average) 288 - 797 - 33053184

Can I setup to covering 30 days? [ a month=30 * 24 * 12= 8664 data points]
Do I have to modify any files or change anything else in order for me to see the graph.

Please help.

Thanks...David

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

#15 Post by gandalf » Tue Jun 06, 2006 12:30 pm

dnguyen wrote:Hi,

The Round Robin Archives is:
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

Per your instructions I should change to:

Daily (5 Minute Average)] 1 - 11000 - 86400
Weekly (30 Minute Average) 6 - 700 - 604800
Monthly (5 Minute Average) 24 - 775 - 2678400
Yearly (1 day Average) 288 - 797 - 33053184

Can I setup to covering 30 days? [ a month=30 * 24 * 12= 8664 data points]
Do I have to modify any files or change anything else in order for me to see the graph.
If you want to have data for exactly 30 days, the rra itself should show 8664 data points as you stated (but there are months with 31 days, eh?). Fine, then.
But this will apply to all new rrd files only. If you want to apply this to already existing rra's, you may use the resize script (see url above). Resizing wants to know the number of additional data points, so based on your calculation this yields 8664 - 600 (those are already present!) = 8064 additional data points.
Of course, this yields not only
Daily (5 Minute Average)
Weekly (30 Minute Average)
Monthly (5 Minute Average)
but
Daily (5 Minute Average)
Weekly (5 Minute Average)
Monthly (5 Minute Average)
This should be all
Reinhard

Post Reply