OK, you have a couple of problems here.
Firstly, your RRD is misconfigured. You have 5 identical RRAs defined - this does not make sense. One RRA will hold values at the specified resolution for all the defined DSs. However, you may want to have more at higher granularity (to speed up graphs of month or year). You may also want to have a MIN or MAX type RRA so that your MIN and MAX figures are more accurate.
For example, this set defines both MAX and MIN RRAs as well as the average, and will also have 4 rollups that roughly correspond to daily, weekly, monthly and yearly graphs.
RRA:AVERAGE:0.5:1:20000 \
RRA:AVERAGE:0.5:6:2000 \
RRA:AVERAGE:0.5:24:2000 \
RRA:AVERAGE:0.5:288:2000 \
RRA:MAX:0.5:1:20000 \
RRA:MAX:0.5:6:2000 \
RRA:MAX:0.5:24:2000 \
RRA:MAX:0.5:288:2000 \
RRA:MIN:0.5:1:20000 \
RRA:MIN:0.5:6:2000 \
RRA:MIN:0.5:24:2000 \
RRA:MIN:0.5:288:2000
Secondly, when you want to print a single figure in the GPRINT line, you need to use a VDEF to convert your time series data (from the DEF or CDEF) into a single value, using some consolodation functions.
For example, this set of commands will use the MAX and MIN type DEFs defined previously, then calculate summaries over them using a VDEF. Of course, you could just use CPUTOTAL instead of defining CPUTOTALMAX and CPUTOTALMIN (saving yourself the additional RRAs) but, as you move to using the lower-granularity RRAs, accuracy will fall. If you don't have lower-granularity RRAs, then you will be accurate, but will use a lot of additional CPU at graph time and graph creation will be slower. Using different resolution RRAs speeds up graph creation.
DEF:CPUTOTAL=CPU.rrd:CPU_ALL:AVERAGE \
DEF:CPUTOTALMAX=CPU.rrd:CPU_ALL:MAX \
DEF:CPUTOTALMIN=CPU.rrd:CPU_ALL:MIN \
VDEF:overallmax=CPUTOTALMAX,MAXIMUM \
VDEF:overallmin=CPUTOTALMIN,MINIMUM \
VDEF:overallavg=CPUTOTAL,AVG \
VDEF:overalllst=CPUTOTAL,LAST \
AREA:CPUTOTAL#FF0000:"CPU Used" \
LINE2:CPUTOTAL#FF0000 \
GPRINT:overallmax:"MAX\:%6.2lf %s" \
GPRINT:overallmin:"MIN\:%6.2lf %s" \
GPRINT:overallavg:"MOY\:%6.2lf %s" \
GPRINT:overalllst:"LAST\:%6.2lf %s" \
GPRINT:overallmax:"Max was at %c":strftime
The last line will print the time of the maxima rather than the value. When a VDEF calculates a MAX or MIN, it actually returns two components - value, and point in time. Usually you use the value, but by appending :strftime
to the GPRINT
directrive you can use the time component instead.
I suggest you spend a bit more time working through the tutorials and examples on the RRDTool Website, which should help you gain a better understanding of how RRDTool works.