Skip to content

Applying right axis formatting creates an error-image #4431

@gj00354347

Description

@gj00354347

Hi Team ,

we are on cacti 1.2.18 and using rrdtool 1.7.2 and we have a graph for monitoring mysql KPI where we are plotting values on left as well as on right side of axis .

so we have applied a --right-axis-format = Normal (Gprint which is = %8.2lf %s' ) and using this right-axis-format creates an error image as attached below .
image

but when we apply the --right-axis-format=%8.2lf it works , so to summarize .

*Failing option: --right-axis-format '%8.2lf %s'
Working option: --right-axis-format '%8.2lf' *

here is what rrdtool says

/rrdtool/1.7.2/bin/rrdtool graph -
--imgformat=PNG
--start='-86400'
--end='-300'
--pango-markup
--title='ABC-Host - Cacti DB Stats - Connections'
--vertical-label='connections'
--slope-mode
--base=1000
--height=200
--width=700
--right-axis '0.004:0'
--right-axis-label 'aborts'
--right-axis-format '%8.2lf %s'
--upper-limit='500'
--lower-limit='0'
COMMENT:"From 2021-10-18 08:48:13 To 2021-10-19 08:43:13\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
--watermark 'ABC Company® prod'
DEF:a='/rra/1/285921.rrd':'ConnAbrt':AVERAGE
DEF:b='/rra/1/285921.rrd':'ConnAbrtClient':AVERAGE
DEF:c='/rra/1/285921.rrd':'Connections':AVERAGE
DEF:d='/rra/1/285921.rrd':'ConnMax':MAX
DEF:e='/rra/1/285921.rrd':'ConnMax':AVERAGE
CDEF:cdefa='a,250,'
CDEF:cdefe='b,250,
'
CDEF:cdefbg='e,UN,INF,0,IF'
AREA:cdefa#FF0000FF:'aborted connections '
GPRINT:a:LAST:'Cur:%8.2lf %s'
GPRINT:a:AVERAGE:'Avg:%8.2lf %s'
GPRINT:a:MAX:'Max:%8.2lf %s\n'
LINE1:cdefe#D4A017FF:'aborted clients '
GPRINT:b:LAST:'Cur:%8.2lf %s'
GPRINT:b:AVERAGE:'Avg:%8.2lf %s'
GPRINT:b:MAX:'Max:%8.2lf %s\n'
LINE2:c#000000FF:'connections '
GPRINT:c:LAST:'Cur:%8.2lf %s'
GPRINT:c:AVERAGE:'Avg:%8.2lf %s'
GPRINT:c:MAX:'Max:%8.2lf %s\n'
LINE2:d#F52887FF:'max parallel connections'
GPRINT:d:LAST:'Cur:%8.2lf %s'
GPRINT:d:AVERAGE:'Avg:%8.2lf %s'
GPRINT:d:MAX:'Max:%8.2lf %s\n'
AREA:cdefbg#ffffc0FF:'no data \n'
COMMENT:' \n'
COMMENT:'Threshold Alert/Warning Values\n'
LINE1:6000#E41B17:'Alert Hi for |data_source_description| - ABC (6,000)':skipscale
LINE1:5000#800517:'Warning Hi for |data_source_description| - ABC (5,000)':skipscale
RRDtool Command lengths = 2144 charaters.
RRDtool Says:
ERROR: invalid format string '%8.2lf %s' (should match '^(?:[^%]+|%%)%[-+ 0#]?[0-9](?:[.][0-9]+)?leEfFgG*$')

To Reproduce

Please create a graph and on --right-axix-format please apply a gprint which is = %8.2lf %s and you will see error.

Expected behavior

an error graph and when you enable the debug , console->management->graphs->select that graph->enable graph debug and you see rrd too complains f the below issue.
ERROR: invalid format string '%8.2lf %s' (should match '^(?:[^%]+|%%)%[-+ 0#]?[0-9](?:[.][0-9]+)?leEfFgG*$')

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. iOS]

  • Browser [e.g. chrome, safari]

  • Version [e.g. 22]

Smartphone (please complete the following information)

  • Device: [e.g. iPhone6]

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions