[rrd-users] Howto show "LAST-MIN" in a graph?

Sven Dittmar sven at bawue.net
Thu Sep 1 16:12:27 MEST 2005


Hi folks,

I monitor my central heating with cacti including a solar panel on the 
roof. I use rrdtool and cacti to visualize it.

I want to show the user the current difference of kWh in each graph.

So my calculation-thinking is:
DIFF = LAST-Value - MIN-Value

I put this into the following CDEF-definition inside cacti:
cdef=CURRENT_DATA_SOURCE,CURRENT_DS_MINIMUM_VALUE,-

and put it into the legend with GPRINT.

But the graph is broken, this is the debug code:

/usr/local/rrdtool-1.2.11/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="CAPITO Solarbilanz" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--units-exponent=1 \
--vertical-label="" \
--slope-mode \
DEF:a="/home/httpd/html/cacti-0.8.6f/rra/capito.rrd":solarbilanz:AVERAGE \
CDEF:cdefd=a,0,- \
AREA:a#EA8F00:"Solarbilanz in kWh"  \
GPRINT:a:LAST:"Aktuell\:%8.0lf"  \
GPRINT:a:MIN:"Min\:%8.0lf"  \
GPRINT:cdefd:LAST:"Diff\:%8.0lf"

I wonder why there is:
CDEF:cdefd=a,0,- \

the "0" should be something like the minimal value, right?

Did anybody manage to get something like this working?

I know this is a little specific to Cacti I tried it in the Cacti forum 
and mailinglist as well. But nobody there seems to know.

A solution just with rrdtool and without cacti-features is okay.

Thanks,
Sven

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list