[rrd-users] How to get LAST, AVG, MAX data (that are in graph legend) in text/string format?
nils_k at inbox.lv
Thu Jan 20 11:52:17 CET 2011
Sorry for such a newbie question, but the thing is, I am using Cacti, and I
want to make automatic reports about traffic-type graphs, that include two
values from graphs - Inbound Max and Outbound Max. I just don't understand
how to get just those two values out of RRD. It would be easier for me, to
make OCR trace on graph image, to extract those numbers :D
/usr/local/bin/rrdtool graph - \
--title='Example graph title' \
COMMENT:"From 2010/12/20 11\:21\:10 To 2011/01/20 09\:21\:10\c" \
COMMENT:" \n" \
--vertical-label='Bits per second' \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
Maybe, there is a way to do that with FETCH or something, but I need only
those values that are GPRINT in graph syntax above.
The last resort, as I understand, is to FETCH data from both RRD's, and
determine largest number for each of RRD's, compare them and output only
one, which is largest (needed for my report calculations).
PS: It would be great, if such a function could be pre-built in rrdtool
graph (reading actual data from image) and maybe, achieved using image
headers or EXIF (or other image/file info storage), reading both of them is
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/How-to-get-LAST-AVG-MAX-data-that-are-in-graph-legend-in-text-string-format-tp5943307p5943307.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
More information about the rrd-users