Graph Export to FTP, SQL Assoc Failed!, Error:'1054'
Moderators: Developers, Moderators
The patch list above is required to generate the exported files. When I attempted to revert back to the old code, the html files were not generated properly.
Now that I have the tree export feature working, I have found an issue with the Index.html that is being generated when "Tree Isolation" is enabled. The export creates the directories and the graphs separately, but the index.html for each separate section includes links in the tree to the other group, which don't work.
The left pane of each index file should only include the links for the node of the tree that is represented but it appears that the only check is for user authorization.
Now that I have the tree export feature working, I have found an issue with the Index.html that is being generated when "Tree Isolation" is enabled. The export creates the directories and the graphs separately, but the index.html for each separate section includes links in the tree to the other group, which don't work.
The left pane of each index file should only include the links for the node of the tree that is represented but it appears that the only check is for user authorization.
-
- Cacti User
- Posts: 234
- Joined: Mon Dec 13, 2004 3:03 pm
Yep, that seems to work. Thanks for the tip. It makes a real mess though, with a 1 minute poller:
No, I did not schedule the export to occur 5 times! I scheduled it for 9:27, and it ended up running again each minute, regenerating the same graphs and making a real mess out of things.
And furthermore, my Aggregate graphs (created with the aggregate plugin) don't export correctly. The graphs are there, but the tree creation/html code doesn't link to them correctly.
ugh.
Code: Select all
07/14/2008 09:26:12 PM - EXPORT STATS: ExportDate:2008-07-14_21:26:12 ExportDuration:37.1726 TotalGraphsExported:161
07/14/2008 09:27:08 PM - EXPORT STATS: ExportDate:2008-07-14_21:27:08 ExportDuration:33.5051 TotalGraphsExported:161
07/14/2008 09:28:07 PM - EXPORT STATS: ExportDate:2008-07-14_21:28:07 ExportDuration:32.3050 TotalGraphsExported:161
07/14/2008 09:29:10 PM - EXPORT STATS: ExportDate:2008-07-14_21:29:10 ExportDuration:34.8850 TotalGraphsExported:161
07/14/2008 09:30:05 PM - EXPORT STATS: ExportDate:2008-07-14_21:30:05 ExportDuration:30.5718 TotalGraphsExported:161
And furthermore, my Aggregate graphs (created with the aggregate plugin) don't export correctly. The graphs are there, but the tree creation/html code doesn't link to them correctly.
ugh.
As best I can tell, the code should only export every poller cycle if you select "Export Timing > Classic" in the Settings. If you want to have it exprot once a day, then make sure you have "Export Timing > Daily at Specified Time" selected.
If you already have it selected and it doesn't work, you could try to trick it into only exporting once a day by selecting "Export Timing > Classic" and then entering 1440 (minutes in a day) in the field for "Export Every x Times" and it should only perform the export once every 24 hours.
You won't get to control the actual time of export, unless you make the changes around the time you want it to start, but it may be an acceptable workaround.
If you already have it selected and it doesn't work, you could try to trick it into only exporting once a day by selecting "Export Timing > Classic" and then entering 1440 (minutes in a day) in the field for "Export Every x Times" and it should only perform the export once every 24 hours.
You won't get to control the actual time of export, unless you make the changes around the time you want it to start, but it may be an acceptable workaround.
-
- Cacti User
- Posts: 234
- Joined: Mon Dec 13, 2004 3:03 pm
Yes, I have it set to export once per day, at a specified time. The 1440 trick seems like an interesting idea, but I'd like for the feature to work as designed. My other guess is that I have some sort of DB problem and that perhaps I need to clean some settings out from there.
I also experience the same problems as mrnoodle when "Tree Isolation" is selected.
mrnoodle, can you post a link to the bug report? Thanks.
I also experience the same problems as mrnoodle when "Tree Isolation" is selected.
mrnoodle, can you post a link to the bug report? Thanks.
I think i have a solution for the '1054' SQL errors, but i haven't tested it thoroughly though (status: 'WFM'), as i haven't got any complex user/permission structure (only one user)
Please correct me if my fix isn't any good...
In (an unmodified) lib/graph_export.php of Cacti 0.8.7b, change the following:
In line 1074, replace:
with:
Insert a new line after line 1387 (so after "LEFT JOIN host ON (host.id=graph_tree_items.host_id)"):
Please correct me if my fix isn't any good...
In (an unmodified) lib/graph_export.php of Cacti 0.8.7b, change the following:
In line 1074, replace:
Code: Select all
host.id=user_auth_perms.item_id
Code: Select all
graph_local.host_id=user_auth_perms.item_id
Code: Select all
LEFT JOIN graph_templates_graph ON (graph_tree_items.local_graph_id=graph_templates_graph.local_graph_id)
Thijs,
I have created an user that only has access to the relevant tree and graph templates for the export.
Thanks,
/Jesper
It doesn't work on my system. I get double tree items where one half haven't got any leafs/hosts. When I click on a host, then I get URL to non-existing page.T-h-i-j-s wrote:Please correct me if my fix isn't any good...
I have created an user that only has access to the relevant tree and graph templates for the export.
Thanks,
/Jesper
Ok, then there's obviously something wrong with the addition to the query i quickly made. I think it's something for one of the developers to look into, as my knowledge of the data model of cacti is quite limited...
The query is incomplete (there are columns in the WHERE clauses that don't get included by the JOIN clause that is constructed...
The query is incomplete (there are columns in the WHERE clauses that don't get included by the JOIN clause that is constructed...
-
- Cacti User
- Posts: 234
- Joined: Mon Dec 13, 2004 3:03 pm
FYI the bug posting is
http://bugs.cacti.net/view.php?id=1226
Still not resolved in svn-20081013, from what I can tell.
http://bugs.cacti.net/view.php?id=1226
Still not resolved in svn-20081013, from what I can tell.
Who is online
Users browsing this forum: No registered users and 1 guest