Everything on that end seems to be working correctly. I'm having a problem generating aggregate graphs. I need to make aggregate graphs in an automated fashion.
The number of devices aka linux hosts in a graph can increase or decrease dynamically. One of the things I'm trying to aggregate is multiple data sources on the same
graph but grouped by type. For example I"m collecting memory stats on serveral servers. I'd like to get an aggregate average of memory buffered,cached,and used
memory for the hosts. One of the variables SIMILAR_DATA_SOURCES_NODUPS dosen't appear to work. I think this is because all the files have the same ds type. Is
there a way to group similar datasources by filename. I'll give an example of the command cacti is running.
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='CID - Aggregate Total - memory' \
--rigid \
--base=1000 \
--height=150 \
--width=700 \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='vertical_label' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/data/collectd/rrd/hostname1/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:b="/data/collectd/rrd/hostname1/memory/memory-cached.rrd":'value':AVERAGE \
DEF:c="/data/collectd/rrd/hostname1/memory/memory-free.rrd":'value':AVERAGE \
DEF:d="/data/collectd/rrd/hostname1/memory/memory-used.rrd":'value':AVERAGE \
DEF:e="/data/collectd/rrd/hostname2/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:f="/data/collectd/rrd/hostname2/memory/memory-cached.rrd":'value':AVERAGE \
DEF:g="/data/collectd/rrd/hostname2/memory/memory-free.rrd":'value':AVERAGE \
DEF:h="/data/collectd/rrd/hostname2/memory/memory-used.rrd":'value':AVERAGE \
DEF:i="/data/collectd/rrd/hostname3/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:j="/data/collectd/rrd/hostname3/memory/memory-cached.rrd":'value':AVERAGE \
DEF:ba="/data/collectd/rrd/hostname3/memory/memory-free.rrd":'value':AVERAGE \
DEF:bb="/data/collectd/rrd/hostname3/memory/memory-used.rrd":'value':AVERAGE \
DEF:bc="/data/collectd/rrd/hostname4/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:bd="/data/collectd/rrd/hostname4/memory/memory-cached.rrd":'value':AVERAGE \
DEF:be="/data/collectd/rrd/hostname4/memory/memory-free.rrd":'value':AVERAGE \
DEF:bf="/data/collectd/rrd/hostname4/memory/memory-used.rrd":'value':AVERAGE \
DEF:bg="/data/collectd/rrd/hostname5/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:bh="/data/collectd/rrd/hostname5/memory/memory-cached.rrd":'value':AVERAGE \
DEF:bi="/data/collectd/rrd/hostname5/memory/memory-free.rrd":'value':AVERAGE \
DEF:bj="/data/collectd/rrd/hostname5/memory/memory-used.rrd":'value':AVERAGE \
DEF:ca="/data/collectd/rrd/hostname6/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:cb="/data/collectd/rrd/hostname6/memory/memory-cached.rrd":'value':AVERAGE \
DEF:cc="/data/collectd/rrd/hostname6/memory/memory-free.rrd":'value':AVERAGE \
DEF:cd="/data/collectd/rrd/hostname6/memory/memory-used.rrd":'value':AVERAGE \
DEF:ce="/data/collectd/rrd/hostname7/memory/memory-buffered.rrd":'value':AVERAGE \
DEF:cf="/data/collectd/rrd/hostname7/memory/memory-cached.rrd":'value':AVERAGE \
DEF:cg="/data/collectd/rrd/hostname7/memory/memory-free.rrd":'value':AVERAGE \
DEF:ch="/data/collectd/rrd/hostname7/memory/memory-used.rrd":'value':AVERAGE \
CDEF:cdefdh='TIME,1339426010,GT,a,a,UN,0,a,IF,IF,TIME,1339426010,GT,b,b,UN,0,b,IF,IF,TIME,1339426010,GT,c,c,UN,0,c,IF,IF,TIME,1339426010,GT,d,d,UN,0,d,IF,IF,TIME,1339426010,GT,e,e,UN,0,e,IF,IF,TIME,1339426010,GT,f,f,UN,0,f,IF,IF,TIME,1339426010,GT,g,g,UN,0,g,IF,IF,TIME,1339426010,GT,h,h,UN,0,h,IF,IF,TIME,1339426010,GT,i,i,UN,0,i,IF,IF,TIME,1339426010,GT,j,j,UN,0,j,IF,IF,TIME,1339426010,GT,ba,ba,UN,0,ba,IF,IF,TIME,1339426010,GT,bb,bb,UN,0,bb,IF,IF,TIME,1339426010,GT,bc,bc,UN,0,bc,IF,IF,TIME,1339426010,GT,bd,bd,UN,0,bd,IF,IF,TIME,1339426010,GT,be,be,UN,0,be,IF,IF,TIME,1339426010,GT,bf,bf,UN,0,bf,IF,IF,TIME,1339426010,GT,bg,bg,UN,0,bg,IF,IF,TIME,1339426010,GT,bh,bh,UN,0,bh,IF,IF,TIME,1339426010,GT,bi,bi,UN,0,bi,IF,IF,TIME,1339426010,GT,bj,bj,UN,0,bj,IF,IF,TIME,1339426010,GT,ca,ca,UN,0,ca,IF,IF,TIME,1339426010,GT,cb,cb,UN,0,cb,IF,IF,TIME,1339426010,GT,cc,cc,UN,0,cc,IF,IF,TIME,1339426010,GT,cd,cd,UN,0,cd,IF,IF,TIME,1339426010,GT,ce,ce,UN,0,ce,IF,IF,TIME,1339426010,GT,cf,cf,UN,0,cf,IF,IF,TIME,1339426010,GT,cg,cg,UN,0,cg,IF,IF,TIME,1339426010,GT,ch,ch,UN,0,ch,IF,IF,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+' \
CDEF:cdefec='TIME,1339426010,GT,a,a,UN,0,a,IF,IF,TIME,1339426010,GT,b,b,UN,0,b,IF,IF,TIME,1339426010,GT,c,c,UN,0,c,IF,IF,TIME,1339426010,GT,d,d,UN,0,d,IF,IF,TIME,1339426010,GT,e,e,UN,0,e,IF,IF,TIME,1339426010,GT,f,f,UN,0,f,IF,IF,TIME,1339426010,GT,g,g,UN,0,g,IF,IF,TIME,1339426010,GT,h,h,UN,0,h,IF,IF,TIME,1339426010,GT,i,i,UN,0,i,IF,IF,TIME,1339426010,GT,j,j,UN,0,j,IF,IF,TIME,1339426010,GT,ba,ba,UN,0,ba,IF,IF,TIME,1339426010,GT,bb,bb,UN,0,bb,IF,IF,TIME,1339426010,GT,bc,bc,UN,0,bc,IF,IF,TIME,1339426010,GT,bd,bd,UN,0,bd,IF,IF,TIME,1339426010,GT,be,be,UN,0,be,IF,IF,TIME,1339426010,GT,bf,bf,UN,0,bf,IF,IF,TIME,1339426010,GT,bg,bg,UN,0,bg,IF,IF,TIME,1339426010,GT,bh,bh,UN,0,bh,IF,IF,TIME,1339426010,GT,bi,bi,UN,0,bi,IF,IF,TIME,1339426010,GT,bj,bj,UN,0,bj,IF,IF,TIME,1339426010,GT,ca,ca,UN,0,ca,IF,IF,TIME,1339426010,GT,cb,cb,UN,0,cb,IF,IF,TIME,1339426010,GT,cc,cc,UN,0,cc,IF,IF,TIME,1339426010,GT,cd,cd,UN,0,cd,IF,IF,TIME,1339426010,GT,ce,ce,UN,0,ce,IF,IF,TIME,1339426010,GT,cf,cf,UN,0,cf,IF,IF,TIME,1339426010,GT,cg,cg,UN,0,cg,IF,IF,TIME,1339426010,GT,ch,ch,UN,0,ch,IF,IF,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+' \
CDEF:cdefeh='TIME,1339426010,GT,a,a,UN,0,a,IF,IF,TIME,1339426010,GT,b,b,UN,0,b,IF,IF,TIME,1339426010,GT,c,c,UN,0,c,IF,IF,TIME,1339426010,GT,d,d,UN,0,d,IF,IF,TIME,1339426010,GT,e,e,UN,0,e,IF,IF,TIME,1339426010,GT,f,f,UN,0,f,IF,IF,TIME,1339426010,GT,g,g,UN,0,g,IF,IF,TIME,1339426010,GT,h,h,UN,0,h,IF,IF,TIME,1339426010,GT,i,i,UN,0,i,IF,IF,TIME,1339426010,GT,j,j,UN,0,j,IF,IF,TIME,1339426010,GT,ba,ba,UN,0,ba,IF,IF,TIME,1339426010,GT,bb,bb,UN,0,bb,IF,IF,TIME,1339426010,GT,bc,bc,UN,0,bc,IF,IF,TIME,1339426010,GT,bd,bd,UN,0,bd,IF,IF,TIME,1339426010,GT,be,be,UN,0,be,IF,IF,TIME,1339426010,GT,bf,bf,UN,0,bf,IF,IF,TIME,1339426010,GT,bg,bg,UN,0,bg,IF,IF,TIME,1339426010,GT,bh,bh,UN,0,bh,IF,IF,TIME,1339426010,GT,bi,bi,UN,0,bi,IF,IF,TIME,1339426010,GT,bj,bj,UN,0,bj,IF,IF,TIME,1339426010,GT,ca,ca,UN,0,ca,IF,IF,TIME,1339426010,GT,cb,cb,UN,0,cb,IF,IF,TIME,1339426010,GT,cc,cc,UN,0,cc,IF,IF,TIME,1339426010,GT,cd,cd,UN,0,cd,IF,IF,TIME,1339426010,GT,ce,ce,UN,0,ce,IF,IF,TIME,1339426010,GT,cf,cf,UN,0,cf,IF,IF,TIME,1339426010,GT,cg,cg,UN,0,cg,IF,IF,TIME,1339426010,GT,ch,ch,UN,0,ch,IF,IF,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+' \
CDEF:cdeffc='TIME,1339426010,GT,a,a,UN,0,a,IF,IF,TIME,1339426010,GT,b,b,UN,0,b,IF,IF,TIME,1339426010,GT,c,c,UN,0,c,IF,IF,TIME,1339426010,GT,d,d,UN,0,d,IF,IF,TIME,1339426010,GT,e,e,UN,0,e,IF,IF,TIME,1339426010,GT,f,f,UN,0,f,IF,IF,TIME,1339426010,GT,g,g,UN,0,g,IF,IF,TIME,1339426010,GT,h,h,UN,0,h,IF,IF,TIME,1339426010,GT,i,i,UN,0,i,IF,IF,TIME,1339426010,GT,j,j,UN,0,j,IF,IF,TIME,1339426010,GT,ba,ba,UN,0,ba,IF,IF,TIME,1339426010,GT,bb,bb,UN,0,bb,IF,IF,TIME,1339426010,GT,bc,bc,UN,0,bc,IF,IF,TIME,1339426010,GT,bd,bd,UN,0,bd,IF,IF,TIME,1339426010,GT,be,be,UN,0,be,IF,IF,TIME,1339426010,GT,bf,bf,UN,0,bf,IF,IF,TIME,1339426010,GT,bg,bg,UN,0,bg,IF,IF,TIME,1339426010,GT,bh,bh,UN,0,bh,IF,IF,TIME,1339426010,GT,bi,bi,UN,0,bi,IF,IF,TIME,1339426010,GT,bj,bj,UN,0,bj,IF,IF,TIME,1339426010,GT,ca,ca,UN,0,ca,IF,IF,TIME,1339426010,GT,cb,cb,UN,0,cb,IF,IF,TIME,1339426010,GT,cc,cc,UN,0,cc,IF,IF,TIME,1339426010,GT,cd,cd,UN,0,cd,IF,IF,TIME,1339426010,GT,ce,ce,UN,0,ce,IF,IF,TIME,1339426010,GT,cf,cf,UN,0,cf,IF,IF,TIME,1339426010,GT,cg,cg,UN,0,cg,IF,IF,TIME,1339426010,GT,ch,ch,UN,0,ch,IF,IF,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+' \
COMMENT:" \n" \
COMMENT:"hostname1\n" \
LINE1:a:"" \
LINE1:b:"" \
LINE1:c:"" \
LINE1:d:"" \
COMMENT:"hostname2\n" \
LINE1:e:"" \
LINE1:f:"" \
LINE1:g:"" \
LINE1:h:"" \
COMMENT:"hostname3\n" \
LINE1:i:"" \
LINE1:j:"" \
LINE1:ba:"" \
LINE1:bb:"" \
COMMENT:"hostname4\n" \
LINE1:bc:"" \
LINE1:bd:"" \
LINE1:be:"" \
LINE1:bf:"" \
COMMENT:"hostname5\n" \
LINE1:bg:"" \
LINE1:bh:"" \
LINE1:bi:"" \
LINE1:bj:"" \
COMMENT:"hostname6\n" \
LINE1:ca:"" \
LINE1:cb:"" \
LINE1:cc:"" \
LINE1:cd:"" \
COMMENT:"hostname7\n" \
LINE1:ce:"" \
LINE1:cf:"" \
LINE1:cg:"" \
LINE1:ch:"" \
COMMENT:" \n" \
LINE2:cdefdh#837C04FF:"Buffered Memory" \
GPRINT:cdefdh:AVERAGE:"| Average%8.2lf %s" \
GPRINT:cdefdh:LAST:"| Current%8.2lf %s" \
GPRINT:cdefdh:MIN:"| Min%8.2lf %s" \
GPRINT:cdefdh:MAX:"| Max%8.2lf %s\n" \
LINE2:cdefec#4668E4FF:"Cached Memory" \
GPRINT:cdefec:AVERAGE:" | Average%8.2lf %s" \
GPRINT:cdefec:LAST:"| Current%8.2lf %s" \
GPRINT:cdefec:MIN:"| Min%8.2lf %s" \
GPRINT:cdefec:MAX:"| Max%8.2lf %s\n" \
LINE2:cdefeh#FF0000FF:"Free Memory" \
GPRINT:cdefeh:AVERAGE:" | Average%8.2lf %s" \
GPRINT:cdefeh:LAST:"| Current%8.2lf %s" \
GPRINT:cdefeh:MIN:"| Min%8.2lf %s" \
GPRINT:cdefeh:MAX:"| Max%8.2lf %s\n" \
LINE2:cdeffc#000000FF:"Used Memory" \
GPRINT:cdeffc:AVERAGE:" | Average%8.2lf %s" \
GPRINT:cdeffc:LAST:"| Current%8.2lf %s" \
GPRINT:cdeffc:MIN:"| Min%8.2lf %s" \
GPRINT:cdeffc:MAX:"| Max%8.2lf %s\n"
RRDTool Says:
OK
Just creating a cdef like a,b,c,+,+,+ will not work becasue the number of hosts can change depending on the directory structure.
Is there a way to set dynamically a cdef like "a,e,i,bc,bg,ca,ce,+,+,+,+,+,+" does anyone know what DEF is for 100?? Would it be 'baa"? If that's the case I think i can
programmatically make a cdef. Please let me know if you need more screen shots or you need me to clarify anything. Any help would be appreciated.