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

Editing any item on an Aggregate Graph that has been converted to a normal graph breaks entire graph #3651

Closed
iskandarbasman opened this issue Jul 2, 2020 · 7 comments · Fixed by #3680
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@iskandarbasman
Copy link

iskandarbasman commented Jul 2, 2020

Describe the bug

Converted Aggregate graph to a normal graph because I want to edit it to be more like the Aggregate graph in cacti 8.8.
Trying to edit almost any graph item breaks it.

To Reproduce

Steps to reproduce the behavior:

  1. Edit Graph.

  2. Click on Item 28.

  3. Change the colour.

  4. Save and Graphs break.

Expected behavior

Should allow me to edit the graph without breaking it.

Screenshots

Before
image

After
image

Raw Debug Before
`
RRDtool Command:
/usr/bin/rrdtool graph -
--imgformat=PNG
--start='-86400'
--end='-300'
--pango-markup
--title='Aggregate - AS4657 STARHUB'
--vertical-label='bits per second'
--slope-mode
--base=1000
--height=200
--width=700
--rigid
--alt-autoscale-max
--lower-limit='0'
COMMENT:"From 2020-07-01 13:52:20 To 2020-07-02 13:47:20\c"
COMMENT:" \n"
--border 1 --slope-mode
--watermark 'Generated by Cacti®'
DEF:a='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_in':MAX
DEF:b='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_in':AVERAGE
DEF:c='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_out':MAX
DEF:d='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_out':AVERAGE
DEF:e='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_in':MAX
DEF:f='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_in':AVERAGE
DEF:g='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_out':MAX
DEF:h='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_out':AVERAGE
CDEF:cdefa='a,8,'
CDEF:cdefb='b,8,
'
CDEF:cdeff='c,8,'
CDEF:cdefg='d,8,
'
CDEF:cdefba='e,8,'
CDEF:cdefbb='f,8,
'
CDEF:cdefbf='g,8,'
CDEF:cdefbg='h,8,
'
CDEF:cdefcb='TIME,1593668840,GT,b,b,UN,0,b,IF,IF,TIME,1593668840,GT,f,f,UN,0,f,IF,IF,+,8,'
CDEF:cdefcg='TIME,1593668840,GT,d,d,UN,0,d,IF,IF,TIME,1593668840,GT,h,h,UN,0,h,IF,IF,+,8,
'
LINE0.01:cdefa#00CF00FF:'NKIPNAC000BR001':STACK
LINE0.01:cdefb#00CF007F:'NKIPNAC000BR001':STACK
GPRINT:cdefb:LAST:'Current:%8.2lf %s'
GPRINT:cdefb:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefb:MAX:'Maximum:%8.2lf %s\n'
LINE0.01:cdeff#002A97FF:'NKIPNAC000BR001':STACK
LINE0.01:cdefg#002A977F:'NKIPNAC000BR001':STACK
GPRINT:cdefg:LAST:'Current:%8.2lf %s'
GPRINT:cdefg:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefg:MAX:'Maximum:%8.2lf %s\n'
LINE0.01:cdefba#00CF00FF:'NKIPO1C000BR001':STACK
LINE0.01:cdefbb#00CF007F:'NKIPO1C000BR001':STACK
GPRINT:cdefbb:LAST:'Current:%8.2lf %s'
GPRINT:cdefbb:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefbb:MAX:'Maximum:%8.2lf %s\n'
LINE0.01:cdefbf#002A97FF:'NKIPO1C000BR001':STACK
LINE0.01:cdefbg#002A977F:'NKIPO1C000BR001':STACK
GPRINT:cdefbg:LAST:'Current:%8.2lf %s'
GPRINT:cdefbg:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefbg:MAX:'Maximum:%8.2lf %s\n'
COMMENT:' \n'
LINE0.01:cdefcb#00CF00FF::STACK
LINE1:cdefcb#00CF007F:'Total '
GPRINT:cdefcb:LAST:'Current:%8.2lf %s'
GPRINT:cdefcb:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefcb:MAX:'Maximum:%8.2lf %s\n'
LINE0.01:cdefcg#002A97FF::STACK
LINE1:cdefcg#002A977F:'Total '
GPRINT:cdefcg:LAST:'Current:%8.2lf %s'
GPRINT:cdefcg:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefcg:MAX:'Maximum:%8.2lf %s\n'
RRDtool Command lengths = 2771 charaters.
RRDtool Says:
OK

`
Raw Debug After

RRDtool Command: /usr/bin/rrdtool graph - \ --imgformat=PNG \ --start='-86400' \ --end='-300' \ --pango-markup \ --title='Aggregate - AS4657 STARHUB' \ --vertical-label='bits per second' \ --slope-mode \ --base=1000 \ --height=200 \ --width=700 \ --rigid \ --alt-autoscale-max \ --lower-limit='0' \ COMMENT:"From 2020-07-01 13\:53\:19 To 2020-07-02 13\:48\:19\c" \ COMMENT:" \n" \ --border 1 --slope-mode \ --watermark 'Generated by Cacti®' \ DEF:a='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_in':MAX \ DEF:b='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_in':AVERAGE \ DEF:c='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_out':MAX \ DEF:d='/usr/share/cacti/rra/nkipnac000br001_traffic_in_199.rrd':'traffic_out':AVERAGE \ DEF:e='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_in':MAX \ DEF:f='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_in':AVERAGE \ DEF:g='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_out':MAX \ DEF:h='/usr/share/cacti/rra/nkipo1c000br001_traffic_in_170.rrd':'traffic_out':AVERAGE \ CDEF:cdefa='a,8,*' \ CDEF:cdefb='b,8,*' \ CDEF:cdeff='c,8,*' \ CDEF:cdefg='d,8,*' \ CDEF:cdefba='e,8,*' \ CDEF:cdefbb='f,8,*' \ CDEF:cdefbf='g,8,*' \ CDEF:cdefbg='h,8,*' \ CDEF:cdefcb='TIME,1593668899,GT,b,b,UN,0,b,IF,IF,TIME,1593668899,GT,f,f,UN,0,f,IF,IF,+,8,*' \ CDEF:cdefcg='TIME,1593668899,GT,d,d,UN,0,d,IF,IF,TIME,1593668899,GT,h,h,UN,0,h,IF,IF,+,8,*' \ LINE0.01:cdefa#00CF00FF:'NKIPNAC000BR001':STACK \ LINE0.01:cdefb#00CF007F:'NKIPNAC000BR001':STACK \ GPRINT:cdefb:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefb:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefb:MAX:'Maximum\:%8.2lf %s\n' \ LINE0.01:cdeff#002A97FF:'NKIPNAC000BR001':STACK \ LINE0.01:cdefg#002A977F:'NKIPNAC000BR001':STACK \ GPRINT:cdefg:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefg:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefg:MAX:'Maximum\:%8.2lf %s\n' \ LINE0.01:cdefba#00CF00FF:'NKIPO1C000BR001':STACK \ LINE0.01:cdefbb#00CF007F:'NKIPO1C000BR001':STACK \ GPRINT:cdefbb:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefbb:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefbb:MAX:'Maximum\:%8.2lf %s\n' \ LINE0.01:cdefbf#002A97FF:'NKIPO1C000BR001':STACK \ LINE0.01:cdefbg#002A977F:'NKIPO1C000BR001':STACK \ GPRINT:cdefbg:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefbg:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefbg:MAX:'Maximum\:%8.2lf %s\n' \ COMMENT:' \n' \ LINE0.01:cdefcb#00CF00FF::STACK \ LINE1:cdefcb#00CF007F:'Total ' \ GPRINT:cdefcb:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefcb:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefcb:MAX:'Maximum\:%8.2lf %s\n' \ LINE0.01:cdefcg#002A97FF::STACK \ LINE3:#002A977F:'Total ' \ GPRINT:cdefcg:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefcg:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefcg:MAX:'Maximum\:%8.2lf %s\n' RRDtool Command lengths = 2765 charaters. RRDtool Says: ERROR: parameter '#002A977F' does not represent a number in line LINE3:#002A977F:Total

Desktop (please complete the following information)

  • OS: [e.g. iOS]
    Win10

  • Browser [e.g. chrome, safari]
    Firefox 77.0.1 (64-bit)

@iskandarbasman iskandarbasman added bug Undesired behaviour unverified Some days we don't have a clue labels Jul 2, 2020
@TheWitness
Copy link
Member

TheWitness commented Jul 2, 2020

Pretty sure this is resolved in the 1.2.x branch. Please install it, and then report back. Here is how I upgrade but check against your system for correct users/groups etc.

#!/bin/sh
cd /var/www/html
rm -rf cacti-develop
git clone -b 1.2.x https://github.com/Cacti/cacti.git cacti-develop
/bin/cp -rpf cacti-develop/* cacti
chown -R apache:apache cacti

@iskandarbasman
Copy link
Author

iskandarbasman commented Jul 3, 2020

Pretty sure this is resolved in the 1.2.x branch. Please install it, and then report back. Here is how I upgrade but check against your system for correct users/groups etc.

#!/bin/sh
cd /var/www/html
rm -rf cacti-develop
git clone -b 1.2.x https://github.com/Cacti/cacti.git cacti-develop
/bin/cp -rpf cacti-develop/* cacti
chown -R apache:apache cacti

I have problems installing GIT on this particular VM. (not the admin and don't have the right Redhat repos enabled on the satellite i believe.)

This is pretty much a new install of Cacti 1.2.12.

The original Cacti 1.2.12 was install using yum on this Redhat7 vm.
"https://www.itzgeek.com/how-tos/linux/centos-how-tos/monitor-network-using-cacti-with-centos-7-rhel-7.html"

So I decide to do the traditional TAR upgrade by downloading the TAR ball for cacti 1.2.12 on the cacti website.

The bug persists.
Even editing the colour breaks it.
Is it possible that old code got into the current distribution if this issue was already fixed ?

image

@iskandarbasman
Copy link
Author

Okay just to update.
Did a fresh install of Cacti v1.2.12 from the tar ball.

For this case I only hit the bug when editing the line type of Item 29.

image

@iskandarbasman
Copy link
Author

Pretty sure this is resolved in the 1.2.x branch. Please install it, and then report back. Here is how I upgrade but check against your system for correct users/groups etc.

#!/bin/sh
cd /var/www/html
rm -rf cacti-develop
git clone -b 1.2.x https://github.com/Cacti/cacti.git cacti-develop
/bin/cp -rpf cacti-develop/* cacti
chown -R apache:apache cacti

Okay... Did the GIT update on my VM cacti.
Edit the colour of the last line Item break the graph.

image

@TheWitness
Copy link
Member

Please see what happens when using The Modern or Dark themes. Also, can you help format the RRDtool debug output so we can read it a bit better? The first paste looked much easier to read that the second.

@TheWitness
Copy link
Member

Lastly, when you edit the Graph Item, what is the CDEF set to? It should be something like "Total Add Data Sources'. If not, what was it before you converted the Aggregate to a Graph?

@TheWitness
Copy link
Member

I think I tracked this down.

@TheWitness TheWitness changed the title Cacti 1.2.12 : Editing Aggregate graph breaks it. Editing Regular Graphs from Aggregate Graph breaks it. Jul 11, 2020
@TheWitness TheWitness changed the title Editing Regular Graphs from Aggregate Graph breaks it. Editing Regular Graphs from Aggregate Graph breaks it Jul 11, 2020
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Jul 11, 2020
@TheWitness TheWitness added this to the 1.2.13 milestone Jul 11, 2020
@TheWitness TheWitness linked a pull request Jul 11, 2020 that will close this issue
@netniV netniV changed the title Editing Regular Graphs from Aggregate Graph breaks it Editing any item on an Aggregate Graph that has been converted to a normal graph breaks entire graph Jul 12, 2020
@netniV netniV closed this as completed Jul 13, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2020
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

Successfully merging a pull request may close this issue.

3 participants