Graph Export works only for hosts?

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

Moderators: Developers, Moderators

srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Graph Export works only for hosts?

Post by srhuston »

Instead of having my graphs all lumped under a host, I wanted to separate them out and make them a little nicer (I don't need to see disk stats every time I look at the host's page). However, all the graphs that I setup do not show up at all when exported - only within the cacti view interface.

03/02/2007 08:45:16 PM - EXPORT STATS: ExportDate:2007-03-02_20:45:16 ExportDuration:12.9294 TotalGraphsExported:0

If I put a host entry in there, then the number of exported graphs goes up to 80, and the graphs show up under the host but still not in the tree.

See http://www.srhuston.net/cacti to see what it ends up looking like - though right now it's saying there's 80 graphs exported, and nothing viewable anyway.

I only saw one other person mention this on the forums here, but no solution mentioned. I'm running 0.8.6i from Fedora, though in a desperate attempt at fixing this I even copied the 'lib' directory from 6j over top of the one from 6i. No, it didn't work :P
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What is the effective user for the export and does that user have access to graphs/hosts? Give me a screen shot of the export settings and the effective user graph settings as well as the tree in question.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Post by srhuston »

I've tried it with the effective user of admin, and as guest, with no difference.

Export settings: http://www.srhuston.net/junkpile/export-options.png
Tree: http://www.srhuston.net/junkpile/tree-view.png

I wouldn't think the user graph settings for admin would be restrictive, but here they are anyway: http://www.srhuston.net/junkpile/admin- ... ttings.png

Thanks for your help!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try it once without FTP and let's see what happens. I am thinking that this was never tested. :evil: :oops: :cry: :P

There, that was four steps of the seven in dealing with loss. Thank goodness it was quick :) I might have ended up depressed or something.

But in all seriousness, if that makes a difference, then I can make a patch.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Post by srhuston »

Well, I hope you're ready to go through all four again.. 'cause I did try it writing to /tmp as a local export before, and no dice. Still didn't create all the graphs as it should have. Just tried it again to make sure

A friend of mine (who got me hooked on cacti, and groks SQL more than I probably ever will) sees the same problem, and thought it was in the $sql_where clause; he did some tests and got that statement to return things (as it was it returned zero lines), and thought he had the problem figured out. But the closest he got was to have it export graphs, and still not actually change the HTML pages to link to them. He thinks it might be related to the security patches that were applied in 'i' I think? But neither of us has tried downloading an older version and either running it or diffing to try to see the problem.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Dump you DB and e-mail to me. I am working on Cacti at this moment.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, I confirmed the behavior. It's likely something stupid. This section of code is difficult :(

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Post by srhuston »

The comment from my friend this morning:

<torn_> < $sql_where = "AND !(user_auth_perms.user_id IS NOT NULL AND graph_tree_items.host_id > 0)";
<torn_> ---
<torn_> > $sql_where = "AND !(user_auth_perms.user_id IS NOT NULL)";
<torn_> A bunch of those fixed the graph exporting problem (but who knows if it created and security problems)

But as I mentioned, that only exported the graphs, didn't create the HTML that links the index to them (all the pages you could get to from the index still didn't mention the graphs anywhere, they were just there now - he confirmed this by removing his host graphs from the tree, and they were still being exported when these changes were made).

Hope that helps :P
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yea, that code fragment was intended to be used when creating the graph tree and host graphs. If the host_id is not > 0, then it's not a host. What I don't understand was how was this working before :(

Oh well...
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tracked it down. Regression testing in progress.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Use this graph_export.php. Please verify all your graphs are created.

Larry
Attachments
graph_export.zip
(12.45 KiB) Downloaded 218 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Post by srhuston »

Well, the HTML pages were changed, because they now show the graphs. But it's not updating them any more. I removed the "host" graph from the tree so I'd know looking at the page that it was updated, but the graph pages still show it - the tree pages show it gone as it should be. Export log message also says zero graphs exported (and with a runtime of 12s, I believe it).

Getting there though :>
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Right, I kindof expected that. One more pass in about 10 minutes.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Here you go..

TheWitness
Attachments
graph_export.zip
(12.45 KiB) Downloaded 310 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
srhuston
Posts: 19
Joined: Fri Mar 02, 2007 8:44 pm

Post by srhuston »

Okay, that's got the graphs updating it seems. But the other issue - showing all the graphs on all the pages - still exists too. You can see it at http://www.srhuston.net/cacti ; the "Disk space" graphs should only be on the "Disk Statistics" leaf.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests