I want to just have the current reading graphed as an AREA, and display the other threshold values as GPRINT items, except they appear to be using the current reading data source instead of the data source I've told them to use.
I've created the AREA graph component, as well as the standard three GPRINT components for 'Current', 'Average' & 'Maximum'. These all use the current reading data source and work correctly. I have then created four further GPRINT components, each using a different data source for the various threshold values.
All of the values polled are in degrees, multiplied by 10, so I have created a CDEF to divide by 10 and this is also applied to all graph components.
The problem is these last four GPRINT components are using the original data source, not the data source I assigned to them. I confirmed this by looking at the "rrdtool graph" debug, which looks like this:
Code: Select all
...
--vertical-label="degrees" \
DEF:a="/var/www/cacti/rra/server01_probe_reading_177.rrd":probe_reading:AVERAGE \
CDEF:cdefb=a,10,/ \
CDEF:cdeff=a,10,/ \
CDEF:cdefg=a,10,/ \
CDEF:cdefh=a,10,/ \
CDEF:cdefi=a,10,/ \
COMMENT:"Temperature\n" \
AREA:cdefb#ED7600:"Current Reading" \
GPRINT:cdefb:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefb:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefb:MAX:"Maximum\:%8.2lf %s\n" \
GPRINT:cdeff:AVERAGE:"Maximum Failure%8.2lf %s\n" \
GPRINT:cdefg:AVERAGE:"Maximum Warning%8.2lf %s\n" \
GPRINT:cdefh:AVERAGE:"Minimum Warning%8.2lf %s\n" \
GPRINT:cdefi:AVERAGE:"Minimum Failure%8.2lf %s"
Any ideas? My guess is because they're not graphed they don't get included somehow.