Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying right axis formatting creates an error-image #4431

Closed
gj00354347 opened this issue Oct 19, 2021 · 9 comments
Closed

Applying right axis formatting creates an error-image #4431

gj00354347 opened this issue Oct 19, 2021 · 9 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@gj00354347
Copy link

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.

@gj00354347 gj00354347 added bug Undesired behaviour unverified Some days we don't have a clue labels Oct 19, 2021
@TheWitness
Copy link
Member

That looks almost like something to do with RRDtool. I'll take a closer look.

@TheWitness
Copy link
Member

@gj00354347, can you upload a screen shot of the entire template. Do two or three screen shots so that it's readable.

@TheWitness
Copy link
Member

Can you open a ticket with Tobi too. His documentation site does not give many examples. This might be an RRDtool bug possibly.

@TheWitness
Copy link
Member

Looks like you are using the Right Axis format of Normal. See if the others work.

TheWitness added a commit that referenced this issue Oct 21, 2021
Applying right axis formatting creates an error-image
@TheWitness
Copy link
Member

Pretty sure this is fixed. It makes sense that they would not allow this. Weird though. It almost seems like an RRDtool bug. Track it down with Tobi.

@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Oct 21, 2021
@TheWitness TheWitness added this to the v1.2.19 milestone Oct 21, 2021
@TheWitness
Copy link
Member

@gj00354347, any updates?

@gj00354347
Copy link
Author

sorry larry for the late response ,

yes you are right as said in the ticket we are using --right-axis-format NORMAL .

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

and if I remove Normal to None and reapply the suggested name , it works .

see snap after changing --right-axis-format from NORMAL (=%8.2lf %s) to NONE.

image

then changed back to --right-axis-format=normal in template and see it stopped working

image
image

PFB snap of Graph template having --right-axis-format=NORMAL

image
image
image

yes and after making --right-axis-format=NORMAL , the graphs again disappear with message

image

let me know if more info is required ??

@TheWitness
Copy link
Member

Log a bug at RRDtool for now. In 1.2.19 at least, anything with a %s format character will not be allowed for the right axis. That change is already committed.

@TheWitness
Copy link
Member

In the mean time, we will keep this resolved, and when RRDtool starts supporting the format character, we can consider reintroducing it.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants