95th percentile for last 30 days

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

Moderators: Developers, Moderators

Post Reply
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

95th percentile for last 30 days

Post by doh!nut »

I'm sure this is a common question/operation but I don't seem to be able to find the answers via search (or in docs) so apologies if it's out there and I missed it!

My understanding so far is that you must increase the default RRA size for "5 minute average" (or whatever highest resolution you define) to 3x the period in question. E.g. if you want 95th percentile of 1 month you should set to 26280 rows (according to http://forums.cacti.net/download.php?id=11555)

So I do that (and resize my existing RRD files - when I get around to it - as detailed here: http://forums.cacti.net/viewtopic.php?t=11425).

Then how do I go about displaying the 95th percentile value for the last 30 days? Or is there some way I can show the 95th percentile for the last 30 days on a 24/48/72 hour graph?

Do I have to add a graph showing the 30 day period, then the figure shown in the legend is the accurate one (graph itself may not be exactly correct due to consolidation required to display that much data in small number of pixels)?

A related(?) question: 95th defaults to in+out, but I want to consider 95th on this basis:

Take all outbound traffic samples for last 30 days, order highest/lowest and disguard top 5%. Repeat for inbound. 95th = highest of the inbound and outbound values (not the two added together).

I presume that one of the variables used to select which 95th calculation type will control this, but I don't understand the documentation for this very well :(

Whilst I'm asking questions, can someone confirm what the "timespan" setting is all about for the RRAs? Does that need changing to something different as well?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Well, you got step on done. Updating the rra and hopefully resizing your rrdtool files as well.

You need to select the time frame from the time span selector at the top, clicking on the graph will only give you the graphs for those consolidation functions.

Graph variables, Nth Percentile are explained in the documentation. If you have questions about a certain type of Nth percentile, let me know.
[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]
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

rony wrote:Well, you got step on done. Updating the rra and hopefully resizing your rrdtool files as well.
Yep - as it happened I made a n00b mistake when upgrading to 0.8.7b (from 0.8.7a) in that I didn't keep a backup of the RRAs, so that made cacti create some new ones of the appropriate size anyway. (I checked this via rrdtool info on the command line)
rony wrote:You need to select the time frame from the time span selector at the top, clicking on the graph will only give you the graphs for those consolidation functions.
I see... so how would I export a graph (i.e. via the 'Graph Export' feature) showing the 95th value for last 30 days?
rony wrote:Graph variables, Nth Percentile are explained in the documentation. If you have questions about a certain type of Nth percentile, let me know.
Thanks, I've had another look. From what I understand, the max "Nth Percentile Type" is the one that behaves as I described - is that correct?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Export for billing purposes? Check Addons.
[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]
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

No. Actually your billing script isn't suitable for my needs, and it also looks like cacti might not be :(

Is there someone willing to answer my questions and help out a little? Or is there somewhere else I could pose these questions for a little help?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I believe Mr. Rony attempted to answer your questions. You should RTM. The 95th percentile is very flexible.

You however, are looking to discard some data, which RRDtool does not typically do. I would suggest a customization. I have written several functions that do exactly what you want. You would simply read the data into an array, discard the data you don't want, take the Nth percentile and display it as an HRULE or something.

There is not much Cacti can't do, you simply have to put some effort into it.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

Thanks TheWitness. I apologise - I know everyone is busy with their own things, and cacti is probably very obvious once you understand it, but I've only just started using it so I'm still getting to grips with it.

Also I don't believe I'm asking cacti to discard any data? I want to be able to determine the 95th value for the last 30 days, or maybe for a given 30 day range. The problem is that cacti wants to display a pre-determined range such as 24 hours, a week etc. and uses certain consolidation operations to achieve this.

I do not mind the consolidation for graph display - I've read enough threads on here to understand why that's necessary - but I need the accurate 95th percentile value.

I should explain that I'm trying to create a graph from a switch connecting to our transit provider so that we can see our own 95th percentile measured at our end compared to their measurement - just for information.

I'm thinking that the timespan setting for RRA is maybe relevant? No?

Your help (including Mr. Rony btw!) is very much appreciated, and those functions sound interesting - any chance you could share?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Then, you need to maintain your 5 minute RRA for 30 days. It's that simple. It's a simple adjustment to the RRA settings. Keep in mind, that when you import templates, any changes to the RRA's are global. So, in 087 we have provided an option to ignore them.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

rony wrote:You need to select the time frame from the time span selector at the top, clicking on the graph will only give you the graphs for those consolidation functions.
With regards to the time span selector, this is fine, but the graph previews only show the graphs themselves - not the actual numbers (i.e. I'm most interested in the figure for 95th rather than a line that allows me to take a reasonable guess at it).
TheWitness wrote:Then, you need to maintain your 5 minute RRA for 30 days.
Ok... so far I've changed my 5 minute RRA to 90 days (see my first post in this thread) - but my understanding is/was that the 95th value shown on any graph only applies to the visible time.

For example, if my graph is showing me data for the last 24 hours (even with 90 days of 5 minute RRA, which this 24 hour graph is based on) it will draw the HRULE and 95th value (number) at the bottom corresponding to the last 24 hours? Is this wrong... will it really be the last 90 days in this configuration?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Nth Percentile only show for the selected timespan on the graph. If you want to see the 5 Minute Average Nth Percentile for the last 30 days you need to selected the the appropriate timespan at the top of the graph page. This is the only way to view a certain time frame in a non-consolidated manor.

When you do this, rrdtool will use the highest resolution data for the give time frame. Because you have 90 days of 5 Minute Average data, it will use that if you select a time frame with in that stored data.
[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]
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

rony wrote:Nth Percentile only show for the selected timespan on the graph. If you want to see the 5 Minute Average Nth Percentile for the last 30 days you need to selected the the appropriate timespan at the top of the graph page. This is the only way to view a certain time frame in a non-consolidated manor.

When you do this, rrdtool will use the highest resolution data for the give time frame. Because you have 90 days of 5 Minute Average data, it will use that if you select a time frame with in that stored data.
Great. :)

So is there any way I can have Cacti print the value (e.g. 47.52 Mbps) as well as draw the line on the graph (for the 30 day 5 minute avg. Nth percentile)?
doh!nut
Posts: 23
Joined: Sat Jan 12, 2008 7:30 pm

Post by doh!nut »

Answer = yes :)

I've been concentrating on the "Preview View", but actually if you switch to "Tree View" (with appropriate graphs added) you can use the timespan controls just fine.

More precisely, any view where you're not using thumbnail previews will show this properly - and of course because you can set the timespan selector to precise dates/times you require there's no need to worry about trying to export at the specific time.

Thanks for all the help - I got there in the end :D
kdmillerii
Posts: 12
Joined: Thu Nov 12, 2009 9:40 am
Location: University Park, PA

Re: 95th percentile for last 30 days

Post by kdmillerii »

I would like to plot the 95th percentile ingress (how we are billed) by month as a line on the standard interface graph. So if you have the graph time setup over 4 months, the 95th percentile line would be be consistent through each month, not 1 line for the entire timespan.
Attachments
the red line is what i would be talking about.
the red line is what i would be talking about.
graph_image.png (36.93 KiB) Viewed 1474 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests