Cacti tree ate itself

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

Moderators: Developers, Moderators

Post Reply
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Cacti tree ate itself

Post by gninja »

I just added a new header to my tree, and added a small number of hosts to that header, and now my entire tree is totally munged.

I have headers that are in the wrong place, I have hosts under headers that are suddenly named the same as hostnames, I have graphs totally in the wrong place. Total chaos.

Fixing this manually, will take me weeks. Even if I script it, it's going to take days.

I'm not seeing anything in the forums or the bug list about anything like this..

Where before I had a tree that looked somewhat like:

Code: Select all

+header1
-host1
-host2
-host3
+header2
-host4
-host5
-host6
Now I have

Code: Select all

+header1
-+header7
--+host5
---host5
---host6
---host7
+header3
-host12
-host13
-host14
It's.. alarming.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

A little more detail.. tree has/had ~1400 entries, there was a second tree that was undamaged.

"Shuffled" tree had been mostly created by the command line scripts. Recent edit was through the gui.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
slebrun
Posts: 2
Joined: Wed Jun 24, 2009 11:26 am

Post by slebrun »

I just had this happen too. Same basic dealie: most things are added via the CLI. Tried to add something via the web GUI, and bang.

Using the add_tree --list_nodes shows everything, but it's all messed up in the GUI. I wound up expunging the graph_tree_items table for that tree_id and repopulating it with the CLIs.

Other trees were unaffected.
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

I've noticed that the order_key field in graph_tree_items is of variable length now. I thought that was constant length before, but I could be wrong.

Anyway:

Code: Select all

mysql> select count(*) from graph_tree_items where length(order_key) = 90;
+----------+
| count(*) |
+----------+
|      147 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from graph_tree_items where length(order_key) = 91;
+----------+
| count(*) |
+----------+
|     1315 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from graph_tree_items where length(order_key) = 92;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from graph_tree_items where length(order_key) = 93;
+----------+
| count(*) |
+----------+
|       11 |
+----------+
1 row in set (0.01 sec)
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Mmmhh...
I had exactly this problem a few months ago, as I upgraded the MySql server to a recent version... I had to downgrade it; this was the only way to re-establish the correct behaviour

Have a look at

http://forums.cacti.net/viewtopic.php?t ... highlight=

Hope it helps



:)
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

Vins wrote:Mmmhh...
I had exactly this problem a few months ago, as I upgraded the MySql server to a recent version...
I've been on the same version of MySQL for almost a year.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests