This tutorial is based on cacti, written by Ian Berry, Larry Adams and Tony Roman. Cacti itself is based on rrdtool, written by Tobias Oetiker. This text was written by Reinhard Scheck to help you figuring out, how to configure cacti to display MAXimum values alongside the commonly plotted AVERAGE ones. This will help getting more information out of the usually defined rra's without the need to change anything concerning the existing rrd files.
As always: Use this information at your own risk.
Here we go!
As an attachment to the forum entry you will find a Graph Template that contains all items discussed here. It is a modified Traffic Graph Template. Things discussed here will of course apply to other Graphs as well.
Common view of Traffic Graph
First, I'll show you the modified template viewed with the standard timeframe of one day. It doesn't look very strange, but let me talk about few things:
- You'll notice, that Outbound Traffic is displayed on the negative side. This is often done; there are lots of those graphs on the forum. It is simply done by a CDEF named Turn bytes into bits, make negative (include in the Template below) that works like
- You'll see both a deeper green and a deeper blue line that fits exactly to the AREA definitions.
- You'll notice a black line that does some TRENDing (there's a nice post on that, I've copied from there) for Inbound and Outbound Traffic
- As usual, you'll see Current, Average and Maximum legend entries
Well, you'll notice that my laptop wasn't online the whole day ...
The magic comes, when you look at some historic data.
See the MAXimum Data after Consolidation
There are some post on the forum complaining about the data loss after consolidation (that is: data is automatically “compressed” by rrdtool). But usually, there's not only the AVERAGE rra but also the MAXimum rra defined. And while executing consolidation automatically, not only the AVERAGE values are stored in the rrd but also the MAXimum ones.
- Values stored initially: 40, 50, 60, 60, 70, 80
- Averaged value after consolidation 6 data Points: (40+50+60+60+70+80)/6 = 60
- Additionally stored MAXimum value: 80
- (if chosen: additionally stored MINimum value: 40)
So you do not only notice the Graph Overall Maximum from the legend (that is: 29.40 k for Inbound) but also when it occurred and additionally the whole timeseries for that MAXimum. (Well, whether TRENDing is helpful here may be answered by yourself)
In this case, CONSOLIDATION took place for 6 data points each, so each AVERAGE value displayed here stands for 6 original data points. You will see this if zooming a little deeper:
Viewing Historical Data
Well, of course this works even if choosing historical data (e.g. Monthly)
The minimum resolution now is 2 hours. But the MAXimum values plotted still represent the biggerst of those consolidated values.
When you look at your rrd's, you will notice that often MAXimum is already defined. To display these values, nothing has to be modified at those rrd's. And there is no additional disk space required compared to methods, that keep data without consolidation.
While graphing the MAXimum values along with the AVERAGE ones, you'll be able to discover the strength of the rrdtool principles.
This Howto may be found as pdf at http://www.team-scheck.de/cacti/view-ma ... values.pdf
I appreciate any feedback to improve this document.
Reinhard Scheck aka lvm