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

Graph template not saved on graph edit #2794

Closed
scamp opened this issue Jul 3, 2019 · 8 comments
Closed

Graph template not saved on graph edit #2794

scamp opened this issue Jul 3, 2019 · 8 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@scamp
Copy link

scamp commented Jul 3, 2019

Cacti version
1.2.3 via freebsd ports
PHP version
7.2.16
RRDTool version
1.7.0

Describe the bug
The "Graph template" field is not being saved on saving graph settings under graph management.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new graph using Graph management
  2. Select specific template (Interface bits/s), add data sources.
  3. Save the graph.
  4. Return to edit graph, notice the template is different from saved (Cisco CPU usage).
  5. Clicking "Save" without changing the template breaks the graph.

Expected behavior
Graph template, host and data sources correctly saved.

@scamp
Copy link
Author

scamp commented Jul 3, 2019

Please note, that affected graphs were added manually using "New graph" page using previous versions of Cacti.
Now any of "Interface" graph templates are not present on template list when creating a new graph from scratch. Creating graphs from "Device" page works fine.
I wonder if this could be related.

@cigamit
Copy link
Member

cigamit commented Jul 6, 2019

You will have to provide additional detail like the contents of your log files, and screen shows of the RRDtool debug output from Graph Management both before and after. There is simply not enough information for us to diagnose from what you have provided.

@cigamit cigamit added the unverified Some days we don't have a clue label Jul 6, 2019
@barreljan
Copy link
Contributor

barreljan commented Jul 24, 2019

Same here. Thought it was a browser thing... I was loosing my mind about this. In the earlier version (1.2.2 or 1.2.3) it was working, still with some quirks though (same as scamps point 5).

Cacti version
1.2.4 via Yum epel repo, using Spine 1.2.4
PHP version
7.3.7
RRDTool version
1.4.8
SQL:
MariaDB 10.2.25

Centos 7.6.1810
SELinux enabled. No failures in the audit logs

We have some custom graphs and the aggrate function does not satisify our needs. We aggregate it ourself from multiple devices (all plain traffic).

@cigamit; I will be making some of the requested information. For now basically,
its a graph template with no data sources, but custom inputs. Then, add a new graph via Management, choose the template and no device. Unlock the graph. Choose the neccesary Graph Item Fields. Then, save. As you would expect, all Graph Item Fields are saved, but if you edit the new graph, the Select Graph Template is back to 2 Cisco Memory Usage (or whatever sits on top), and all the inputs at the Graph Item Fields section are one and the same from the same device.

Here some screens. The log is attached also, no specific entry found. Some issues I need to fix but not related.

template and template items
capt1
capt1a
capt1b

add new graph
capt2

graph is new, all blank
capt3

all filled in
capt4

Then: save

Reopen the graph
capt5
log.txt

The graph Cacti makes is partly correct, but it uses the same traffic_in and traffic_out for all the inputs.... The choosen template is back on the top item of the list. Why does it not remember the selected inputs and flips it back to just 1 and the same?

@scamp is this the same sort of issue you are experiencing?

@cigamit
Copy link
Member

cigamit commented Jul 24, 2019

If you two can update to 1.2.5 first, that would be appreciated.

@cigamit
Copy link
Member

cigamit commented Jul 24, 2019

Oh, this is interesting. I see what the bug is now.

cigamit added a commit that referenced this issue Jul 25, 2019
Graph template not saved on graph edit
@cigamit cigamit added bug Undesired behaviour resolved A fixed issue and removed unverified Some days we don't have a clue labels Jul 25, 2019
@cigamit cigamit added this to the v1.2.6 milestone Jul 25, 2019
@cigamit
Copy link
Member

cigamit commented Jul 25, 2019

Okay, I've made a change, though it won't help for graphs that are broken already. So, before you apply this fix, make sure your graphs are okay. After the change, the problem should be resolved, though it's obfuscating some things, which I don't think is a problem.

@scamp
Copy link
Author

scamp commented Jul 27, 2019

@scamp is this the same sort of issue you are experiencing?

Yes, thats it!
Thanks for detailed description.

@scamp
Copy link
Author

scamp commented Jul 27, 2019

@cigamit thanks, verified as resolved.
Now I am able to edit graphs and change data sources without resetting graph template.
Also template option has been removed from graph edit page.

@cigamit cigamit closed this as completed Aug 11, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 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

No branches or pull requests

3 participants