my graphs are breaking when i change the "Consolidation Function" from AVERAGE to MAX for the "ucd/net - CPU Usage" graph template.
i've narrowed down the problem to the "Total" graph template item. for each item that i change from AVERAGE to MAX, i lose entries in the corresponding cdef until i finally get a blank one.
let me illustrate. here is a sample starting graph (i put everything back from memory so it's possible that this does not 100% match the "as shipped" version of the graph template.)
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="debops2 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=100 \
--lower-limit=0 \
--vertical-label="percent" \
DEF:a="/usr/share/cacti/site/rra/debops2_cpu_system_212.rrd":cpu_system:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/debops2_cpu_user_213.rrd":cpu_user:AVERAGE \
DEF:c="/usr/share/cacti/site/rra/debops2_cpu_nice_211.rrd":cpu_nice:AVERAGE \
CDEF:cdefbc=TIME,1166473128,GT,a,a,UN,0,a,IF,IF,TIME,1166473128,GT,b,b,UN,0,b,IF,IF,TIME,1166473128,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#FF0000:"System" \
GPRINT:a:LAST:"Current\:%8.3lf" \
GPRINT:a:AVERAGE:"Average\:%8.3lf" \
GPRINT:a:MAX:"Maximum\:%8.3lf\n" \
STACK:b#0000FF:"User" \
GPRINT:b:LAST:" Current\:%8.3lf" \
GPRINT:b:AVERAGE:"Average\:%8.3lf" \
GPRINT:b:MAX:"Maximum\:%8.3lf\n" \
STACK:c#00FF00:"Nice" \
GPRINT:c:LAST:" Current\:%8.3lf" \
GPRINT:c:AVERAGE:"Average\:%8.3lf" \
GPRINT:c:MAX:"Maximum\:%8.3lf\n" \
LINE1:cdefbc#:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s\n"
now, after changing "System" from AVERAGE to MAX:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="debops2 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=100 \
--lower-limit=0 \
--vertical-label="percent" \
DEF:a="/usr/share/cacti/site/rra/debops2_cpu_system_212.rrd":cpu_system:MAX \
DEF:b="/usr/share/cacti/site/rra/debops2_cpu_user_213.rrd":cpu_user:AVERAGE \
DEF:c="/usr/share/cacti/site/rra/debops2_cpu_nice_211.rrd":cpu_nice:AVERAGE \
CDEF:cdefbc=TIME,1166473436,GT,b,b,UN,0,b,IF,IF,TIME,1166473436,GT,c,c,UN,0,c,IF,IF,+ \
AREA:a#FF0000:"System" \
GPRINT:a:LAST:"Current\:%8.3lf" \
GPRINT:a:AVERAGE:"Average\:%8.3lf" \
GPRINT:a:MAX:"Maximum\:%8.3lf\n" \
STACK:b#0000FF:"User" \
GPRINT:b:LAST:" Current\:%8.3lf" \
GPRINT:b:AVERAGE:"Average\:%8.3lf" \
GPRINT:b:MAX:"Maximum\:%8.3lf\n" \
STACK:c#00FF00:"Nice" \
GPRINT:c:LAST:" Current\:%8.3lf" \
GPRINT:c:AVERAGE:"Average\:%8.3lf" \
GPRINT:c:MAX:"Maximum\:%8.3lf\n" \
LINE1:cdefbc#:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s\n"
now, after changing "User", "Nice" and "Total" from AVERAGE to MAX, i get this:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="debops2 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=100 \
--lower-limit=0 \
--vertical-label="percent" \
DEF:a="/usr/share/cacti/site/rra/debops2_cpu_system_212.rrd":cpu_system:MAX \
DEF:b="/usr/share/cacti/site/rra/debops2_cpu_user_213.rrd":cpu_user:MAX \
DEF:c="/usr/share/cacti/site/rra/debops2_cpu_nice_211.rrd":cpu_nice:MAX \
CDEF:cdefbc= \
AREA:a#FF0000:"System" \
GPRINT:a:LAST:"Current\:%8.3lf" \
GPRINT:a:AVERAGE:"Average\:%8.3lf" \
GPRINT:a:MAX:"Maximum\:%8.3lf\n" \
STACK:b#0000FF:"User" \
GPRINT:b:LAST:" Current\:%8.3lf" \
GPRINT:b:AVERAGE:"Average\:%8.3lf" \
GPRINT:b:MAX:"Maximum\:%8.3lf\n" \
STACK:c#00FF00:"Nice" \
GPRINT:c:LAST:" Current\:%8.3lf" \
GPRINT:c:AVERAGE:"Average\:%8.3lf" \
GPRINT:c:MAX:"Maximum\:%8.3lf\n" \
LINE1:cdefbc#:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s\n"
i tried to read lib/rrd.php but it was beyond my ability to quickly grasp. is ALL_DATA_SOURCES_NODUPS fundamentally incompatible with the MAX consolidation function?
thanks,
jlg