Tree mode rendering wrong?

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

Moderators: Developers, Moderators

Post Reply
synt4x
Posts: 3
Joined: Sat Jul 29, 2006 10:56 am

Tree mode rendering wrong?

Post by synt4x »

For some reason when I go to 'Graphs' to view my setup in 'Tree' mode:
* No trees render, except for the one setup as my default
* None of my hosts appear as children under my default tree

Image

However, I *do* have hosts associated with this tree;
Image

And there are other trees I have setup:
Image


This is on the latest version of the source and occurs in Firefox, Safari, and IE.

Is this a bug? Did I manage to botch the configuration some how?
synt4x
Posts: 3
Joined: Sat Jul 29, 2006 10:56 am

Post by synt4x »

I took at a look at the source and stumbled on this JS:

Code: Select all

	foldersTree = gFld("", "")
ou0 = insFld(foldersTree, gFld("Office", "graph_view.php?action=tree&tree_id=1"))
ou1 = insFld(ou-0, gFld("<strong>Host:</strong> Localhost", "graph_view.php?action=tree&tree_id=1&leaf_id=7"))
ou1 = insFld(ou-0, gFld("<strong>Host:</strong> RV016 Router", "graph_view.php?action=tree&tree_id=1&leaf_id=8"))
ou0 = insFld(foldersTree, gFld("Rackspace", "graph_view.php?action=tree&tree_id=2"))
ou0 = insFld(foldersTree, gFld("Sprocket Networks", "graph_view.php?action=tree&tree_id=3"))
	foldersTree.treeID = "t2";
So it at least looks like the tree setup is configured right. But it also looks like some javascript errors are popping up (specifically related to the "insFld(ou-0" line, when the variable is named ou0.

Image

so, is this a bug? I didn't see any mention of it upon searching the forum or in the patches area, but if it is a bug I can't imagine I'm the only person with this problem.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This looks like a PHP bug. What version of PHP are you running? Please run php -v from the command line.

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?
exp07
Posts: 2
Joined: Thu Jun 01, 2006 4:47 am

Post by exp07 »

/usr/local/bin/php -v
PHP 5.1.4 (cli) (built: Jun 15 2006 18:12:00)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

someone can help me?
this bug haven't been fixed yet,5555555555
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Are you using any plugins? Have you modded Cacti at all? Can you downgrade PHP? What is your OS and version?

Thanks,

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 »

Please dump your database and e-mail to me.

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?
synt4x
Posts: 3
Joined: Sat Jul 29, 2006 10:56 am

Post by synt4x »

I sort of ignored this for a week, and when I came back it worked completely as normal. Maybe enough polling in the crontab or something else fixed it.

gabebug@proto ~ $ php -v (note, this hasn't changed since the original post)
PHP 4.4.2-pl6-gentoo (cli) (built: Jul 28 2006 15:55:08)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
gabebug@proto ~ $ uname -a
Linux proto 2.6.16-hardened-r10 #2 SMP PREEMPT Wed Jul 19 16:05:46 CDT 2006 i686 Intel(R) Xeon(TM) CPU 3.00GHz GNU/Linux
(using grsec in the kernel, and the php was compiled with pie+ssp)

No third party modules or anything were used in my install. I tried using by an ebuild of cacti, as well as the latest version from source with identical results. Here is the javascript as of today:

Code: Select all

	foldersTree = gFld("", "")
ou0 = insFld(foldersTree, gFld("Office", "graph_view.php?action=tree&tree_id=1"))
ou1 = insFld(ou0, gFld("<strong>Host:</strong> Localhost", "graph_view.php?action=tree&tree_id=1&leaf_id=7"))
ou2 = insFld(ou1, gFld(" Linux - Memory Usage", "graph_view.php?action=tree&tree_id=1&leaf_id=7&host_group_data=graph_template:12"))
ou2 = insFld(ou1, gFld(" Unix - Available Disk Space", "graph_view.php?action=tree&tree_id=1&leaf_id=7&host_group_data=graph_template:21"))
ou2 = insFld(ou1, gFld(" Unix - Load Average", "graph_view.php?action=tree&tree_id=1&leaf_id=7&host_group_data=graph_template:9"))
ou2 = insFld(ou1, gFld(" Unix - Logged in Users", "graph_view.php?action=tree&tree_id=1&leaf_id=7&host_group_data=graph_template:10"))
ou2 = insFld(ou1, gFld(" Unix - Processes", "graph_view.php?action=tree&tree_id=1&leaf_id=7&host_group_data=graph_template:8"))
ou1 = insFld(ou0, gFld("<strong>Host:</strong> RV016 Router", "graph_view.php?action=tree&tree_id=1&leaf_id=8"))
ou2 = insFld(ou1, gFld(" SNMP - Interface Statistics", "graph_view.php?action=tree&tree_id=1&leaf_id=8&host_group_data=data_query:1"))
ou3 = insFld(ou2, gFld(" ixp1", "graph_view.php?action=tree&tree_id=1&leaf_id=8&host_group_data=data_query_index:1:4"))
ou3 = insFld(ou2, gFld(" ixp2", "graph_view.php?action=tree&tree_id=1&leaf_id=8&host_group_data=data_query_index:1:5"))
ou2 = insFld(ou1, gFld(" (Non Indexed)", "graph_view.php?action=tree&tree_id=1&leaf_id=8&host_group_data=data_query:0"))
ou3 = insFld(ou2, gFld(" Unknown Index", "graph_view.php?action=tree&tree_id=1&leaf_id=8&host_group_data=data_query_index:0:"))
ou0 = insFld(foldersTree, gFld("Rackspace", "graph_view.php?action=tree&tree_id=2"))
ou0 = insFld(foldersTree, gFld("Sprocket Networks", "graph_view.php?action=tree&tree_id=3"))
	foldersTree.treeID = "t2";

If database dumps are still requested, let me know.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Only if it happens again...

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest