Graph Export to FTP, SQL Assoc Failed!, Error:'1054'

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

mrnoodle
Cacti User
Posts: 59
Joined: Sun Apr 02, 2006 3:56 pm

Post by mrnoodle »

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.
eschoeller
Cacti User
Posts: 234
Joined: Mon Dec 13, 2004 3:03 pm

Post by eschoeller »

Yep, that seems to work. Thanks for the tip. It makes a real mess though, with a 1 minute poller:

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
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.
mrnoodle
Cacti User
Posts: 59
Joined: Sun Apr 02, 2006 3:56 pm

Post by mrnoodle »

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.
mrnoodle
Cacti User
Posts: 59
Joined: Sun Apr 02, 2006 3:56 pm

Post by mrnoodle »

Has anyone opened a Bug report to track this issue? If not I will be happy to open one myself.
mrnoodle
Cacti User
Posts: 59
Joined: Sun Apr 02, 2006 3:56 pm

Post by mrnoodle »

I saw a bug report and I have updated it with the information in this thread.
eschoeller
Cacti User
Posts: 234
Joined: Mon Dec 13, 2004 3:03 pm

Post by eschoeller »

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.
Jesper
Posts: 45
Joined: Mon Mar 11, 2002 7:00 pm

Post by Jesper »

Hi Cacti folks,
Is it possible to post a tweaked graph_export.php that works for a tree presentation export? I would be grateful as I cannot make it work. Thank you!
/Jesper
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The related bug is already assigned but unfortunately not yet solved
Reinhard
T-h-i-j-s
Posts: 4
Joined: Fri Aug 25, 2006 4:51 am

Post by T-h-i-j-s »

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:

Code: Select all

host.id=user_auth_perms.item_id
with:

Code: Select all

graph_local.host_id=user_auth_perms.item_id
Insert a new line after line 1387 (so after "LEFT JOIN host ON (host.id=graph_tree_items.host_id)"):

Code: Select all

LEFT JOIN graph_templates_graph ON (graph_tree_items.local_graph_id=graph_templates_graph.local_graph_id)
elpiako
Cacti User
Posts: 85
Joined: Tue Jul 01, 2008 10:02 am
Location: Lille (FRANCE)

Post by elpiako »

same problem here :(
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a

Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
Jesper
Posts: 45
Joined: Mon Mar 11, 2002 7:00 pm

Post by Jesper »

Thijs,
T-h-i-j-s wrote:Please correct me if my fix isn't any good...
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.

I have created an user that only has access to the relevant tree and graph templates for the export.

Thanks,
/Jesper
T-h-i-j-s
Posts: 4
Joined: Fri Aug 25, 2006 4:51 am

Post by T-h-i-j-s »

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...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please expect a bug fix version of cacti adressing this problem soon.
Reinhard
eschoeller
Cacti User
Posts: 234
Joined: Mon Dec 13, 2004 3:03 pm

Post by eschoeller »

FYI the bug posting is

http://bugs.cacti.net/view.php?id=1226

Still not resolved in svn-20081013, from what I can tell.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I suppose that this bug is a duplicate
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests