I found an error when I changed the CDEF of a graph.
I created a "none host " and "none graph template" graph in graph management . I added many "graph items" and created a new "CDEF" item with this graph.
this is the code of my graph:
Code: Select all
/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="1_IMGUV_SUM" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_49.rrd":traffic_out:AVERAGE \
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_out:AVERAGE \
DEF:i="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \
DEF:j="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_17.rrd":traffic_in:AVERAGE \
CDEF:cdefd=8,a,b,c,d,e,+,+,+,+,* \
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \
AREA:a#:"" \
AREA:b#:"" \
AREA:c#:"" \
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT" \
GPRINT:cdefd:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefd:MAX:"Max\:%8.2lf %s" \
GPRINT:cdefd:AVERAGE:"AVERAGE\:%8.2lf %s\n" \
AREA:e#:"" \
AREA:f#:"" \
AREA:g#:"" \
AREA:h#:"" \
LINE1:cdefbb#3D168B:"imguv_SUM_OUTPUT" \
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s" \
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s" \
AREA:j#:""
but the graph couldn't display after I choose the new "CDEF" item.
I saw the code and found the old "CDEF" item still exist.
Code: Select all
/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="1_IMGUV_SUM" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_49.rrd":traffic_out:AVERAGE \
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \
CDEF:cdefd=8,a,b,c,d,+,+,+,* \
CDEF:cdefe=8,a,b,c,d,e,+,+,+,+,* \
CDEF:cdefba=8,e,f,g,h,+,+,+,* \
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \
AREA:a#:"" \
AREA:b#:"" \
AREA:c#:"" \
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"AVERAGE\:%8.2lf %s\n" \
AREA:e#:"" \
AREA:f#:"" \
AREA:g#:"" \
LINE1:cdefba#3D168B:"imguv_SUM_OUTPUT" \
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s" \
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s"
why the old "CDEF" item still exist?
how to delete the old "CDEF" code on my graph?