Sit down. Be calm. The following is rrdtool hardcore stuff. If I find time, I will (perhaps) add some graphs to make things clear, but I hope to find somebody out there who understands and provides input. This perhaps sounds a bit boastful but is not meant that way.
Let's assume a standard Cacti Traffic Graph. There is an AREA and a LINE graph item. Each of them makes a DEF appear in the rrdtool graph statement. The standard template uses the AVERAGE consolidation statement on them DEF.
Then, you find 3 GPRINTs related to that DEF (via a CDEF that multiplies by 8 to "Turn bytes into Bits"). The Cacti graph template item makes you think
that the consolidation function (CF) used is LAST, AVERAGE and MAX, respectively. In fact, this is wrong
. The GPRINT does not change the consolidation function.
So in fact, we have the consolidation function AVERAGE for all 3 GPRINTs. The LAST GPRINT print the value of the last data point of the AVERAGE CF (that is: last of CF:AVERAGE, not last of CF:LAST).
The AVERAGE GRPINT prints the average of all printed data points of the AVERAGE CF (that is: average of CF:AVERAGE); which sound quite normal.
The MAX GPRINT prints the maximum of all printed data points of the AVERAGE CF (that is maximum of CF:AVERAGE and not maximum of CF:MAXIMUM)
This is the related part of rrdtool graph
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s\n" \