Anybody else having major graph issues?
Moderators: Developers, Moderators
Anybody else having major graph issues?
I seem to be having a bunch of problems with graph templates, graph debug, and graphs in general, and I'm wondering if anybody else is experiencing similar problems.
I can generate working graphs by setting up a graph template and then creating the graph and data source using Polling Hosts. The graph debug will work fine (under graph management), and the Graphs tab works fine. If I update the graph template, however, everything breaks (graph tab hangs, graph debug gives errors).
After wandering around through the code and the database, it looks to me like the local graph is losing the data source id after the template updates. The graph debug errors are due to a malformed call to rrdtool (it lacks the DEF entries because of the missing data source), and I can only assume the graph tab hangs are related (although that may be that PHP session issue as well).
Is this ringing any bells for anybody, or is my install just hosed?
Environment is Cacti 0.8.3a, PHP 4.3.3, Win2K server with all patches.
I can generate working graphs by setting up a graph template and then creating the graph and data source using Polling Hosts. The graph debug will work fine (under graph management), and the Graphs tab works fine. If I update the graph template, however, everything breaks (graph tab hangs, graph debug gives errors).
After wandering around through the code and the database, it looks to me like the local graph is losing the data source id after the template updates. The graph debug errors are due to a malformed call to rrdtool (it lacks the DEF entries because of the missing data source), and I can only assume the graph tab hangs are related (although that may be that PHP session issue as well).
Is this ringing any bells for anybody, or is my install just hosed?
Environment is Cacti 0.8.3a, PHP 4.3.3, Win2K server with all patches.
A bug?
I think I found (and fixed) the problem with the graphing. In the 'push_out_graph_item' function (utility_functions.php, line 537) there's a section at the end that copies the item out to other templates that use the item. Unfortunately, it also overwrites the default 'task_item_id' field in the template which references the actual data source instance. By dropping in a little code to skip the update if it's the 'task_item_id' field, I can now safely make graph template changes without hosing up the graphs I've already built.
Can anyone confirm this to be a bug, or am I missing something about how this works?
Can anyone confirm this to be a bug, or am I missing something about how this works?
I think the problem you are describing is why I created "Graph Item Inputs". If you create a graph item input from a field and one or more graph items, they will NOT be overwritten when template changes are made. Instead you must specify their values on a per-graph basis.
This provides the same functionality as the "Use Per-Graph Value" checkboxes, but adds grouping at the same time.
If you have any further questions or need me to clarify, please let me know.
-Ian
This provides the same functionality as the "Use Per-Graph Value" checkboxes, but adds grouping at the same time.
If you have any further questions or need me to clarify, please let me know.
-Ian
This is the exact problem I'm having too. I just changed the Interface - Traffic bits/s graph template a bit. It caused all the 100+ graphs I had to lose their data sources!
If I go over the graphs, changing the data sources back, the graph titles change to wrong ones.
Using cacti083a with linux. Can't reproduce it in a fresh install though. Weird!
Note: Doesn't seem to be in all graph templates. Just tried it and changed a self made graph template. That worked fine and no graphs lost their sources.
J
If I go over the graphs, changing the data sources back, the graph titles change to wrong ones.
Using cacti083a with linux. Can't reproduce it in a fresh install though. Weird!
Note: Doesn't seem to be in all graph templates. Just tried it and changed a self made graph template. That worked fine and no graphs lost their sources.
J
If you can only reproduce this problem when upgrading, what version did you upgrade from? I highly doubt this problem is Windows-specific, but you never know. I will try and re-produce this problem the best that I can, I would love to see this resolved.Jeppe wrote:This is the exact problem I'm having too. I just changed the Interface - Traffic bits/s graph template a bit. It caused all the 100+ graphs I had to lose their data sources!
-Ian
I've come all the way up from 0.6.something. I seem to be missing some things that are there if you do a fresh install of 0.8.3a, like those traffic templates which have total traffic.raX wrote: If you can only reproduce this problem when upgrading, what version did you upgrade from? I highly doubt this problem is Windows-specific, but you never know. I will try and re-produce this problem the best that I can, I would love to see this resolved.
Too many self made templates and sources etc to do a fresh install...
J
I think I found the bug and fixed it! The problem occurs when saving a graph item input like you all noticed. This is easy to patch. Open up 'graph_templates.php' in a text editor and scroll down to line 307. Now change the following line:
to:
Let me know how it works. This fix will not fix any errors that this bug has caused, but it should prevent it from happening any further.
-Ian
Code: Select all
db_execute("update graph_templates_item set " . $save["column_name"] . "='$value' where graph_template_id=" . $save["graph_template_id"] . " and local_graph_id>0 and " . array_to_sql_or($selected_graph_items, "local_graph_template_item_id"));
Code: Select all
db_execute("update graph_templates_item set " . $save["column_name"] . "='$value' where local_graph_id=$local_graph_id and " . array_to_sql_or($selected_graph_items, "local_graph_template_item_id"));
-Ian
buying advertising
Can you sell banner ads here?
If you do, impressions or CPC?
If you do, impressions or CPC?
Who is online
Users browsing this forum: No registered users and 2 guests