I'm wondering why the GPRINT entry for the maximum value in the graph templates does not use the GPRINT:MAX option?
For example the 'Interface - Unicast Packets' graph template has the Maximum defined as type GPRINT with function MAX as follows:
Which results in a graph such as this, where the Maximum printed is not the max as viewed on the graph:
Code: Select all
RRDtool Command:
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start="1671974763" \
--end="1674586385" \
--pango-markup \
--title="Unicast Packets - nic1.2002" \
--vertical-label="packets/sec" \
--slope-mode \
--base=1000 \
--height=200 \
--width=700 \
--rigid \
--alt-autoscale-max \
--lower-limit="0" \
COMMENT:"From 2022-12-25 13\:26\:03 To 2023-01-24 18\:53\:05\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:"Arial" \
--font AXIS:8:"Arial" \
--font LEGEND:8:"Courier" \
--font UNIT:8:"Arial" \
--font WATERMARK:6:"Arial" \
--slope-mode \
DEF:a="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_in":AVERAGE \
DEF:b="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_out":AVERAGE \
DEF:c="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_in":MAX \
DEF:d="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_out":MAX \
AREA:a#FFD8017F:"Unicast Packets In " \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:b#8065177F:"Unicast Packets Out" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:c#FFD801FF: \
LINE1:d#806517FF:
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" is the maximum of the RRA 'in' average DEF:a.
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" is the maximum of the RRA 'out' average DEF:b
not the maximum of the MAX.
If I change the Type to GPRINT:MAX I get the expected results, the printed value and graph indicate the same.
Code: Select all
RRDtool Command:
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start="1671974763" \
--end="1674586385" \
--pango-markup \
--title="Unicast Packets - nic1.2002" \
--vertical-label="packets/sec" \
--slope-mode \
--base=1000 \
--height=200 \
--width=700 \
--rigid \
--alt-autoscale-max \
--lower-limit="0" \
COMMENT:"From 2022-12-25 13\:26\:03 To 2023-01-24 18\:53\:05\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:"Arial" \
--font AXIS:8:"Arial" \
--font LEGEND:8:"Courier" \
--font UNIT:8:"Arial" \
--font WATERMARK:6:"Arial" \
--slope-mode \
DEF:a="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_in":AVERAGE \
DEF:b="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_in":MAX \
DEF:c="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_out":AVERAGE \
DEF:d="C\:/inetpub/wwwroot/cacti/rra/host0109_-_unicast_in_193.rrd":"unicast_out":MAX \
AREA:a#FFD8017F:"Unicast Packets In " \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:c#8065177F:"Unicast Packets Out" \
GPRINT:c:LAST:"Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:b#FFD801FF: \
LINE1:d#806517FF:
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" is the maximum of the RRA 'in' max DEF:b.
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" is the maximum of the RRA 'out' max DEF:d
which is what I expect.
Is this intended, an oversight or is the Function MAX not working as expected?
If this is an issue I can log it on GitHub.
Thanks