Where have my graphs gone in Tree Mode?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Where have my graphs gone in Tree Mode?

Post by julian924s »

Hi - hope someone can help urgently, had the following setup running for over 300 days uptime now with no issue at all:
Cacti Version - 0.8.7d
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux 2.6.18-164.el5
Web Server - Apache/2.2.3 (Red Hat)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, dbase, gd, memcache, mssql, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp
MySQL - 5.0.77-log
RRDTool - 1.3.8
SNMP - 5.3.2.2
Plugins
  • Global Plugin Settings (settings - v0.5)
    Host Info (hostinfo - v0.2)
    Device Monitoring (monitor - v0.8.2)
    Syslog Monitoring (syslog - v0.5.2)
    Network Tools (tools - v0.3)
    NTop Viewer (ntop - v0.1)
    PHP Network Weathermap (weathermap - v0.96a)
    Thresholds (thold - v0.3.9)
    RRD File Cleaner (RRD Cleaner - v0.38)
    Mobile Cacti (mobile - v0.1)
However, logged in this morning and only 2 items now appears in Tree Mode - there used to be about 20. No one has logged on other than me and no changes have been made at all in weeks?

If I goto Console and view graphs via Graph Management, or Trees via Graph Tree's EVERYTHING is there - it just not showing them all from the Tree Mode of the Graphs Tab - does anyone know why this might be and how to fix it?

Thanks.
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Permissions checked for the user you a logged in with? Maybe the specific tree items are excluded.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

No - I admin the server / cacti have FULL privs on everything. Tried in IE / Firefox flushed cache etc. Still the same, so am sure something has changed within Cacti and not necessarily by a user. Checked the user logins from yesterday and only me logged in, but I made no changes at all - just viewed graphs.

Thanks - J.
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Update, someone else did make a change yesterday and it "went wrong" - no idea what actually happened. And still no fix - would take an age to sort out manually so if anyone knows how to fix this I'd appreciate it.

Thanks - J.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please verify health status of the tree tables. See "System Utilities -> Tech Info" and scroll down to the table status.
There's a table repair utility located in the cli directory
R.
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Hi - I see System Utilities but nothing called Tech Info? Ah ... I see Technical Support now!!

ALL table status's are OK.

Thanks.
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Hi - ran the repair table script from the command line, all ok, restarted apache and still the same:

php repair_database.php -d
Repairing All Cacti Database Tables
Repairing Table -> 'cdef' Successful
Repairing Table -> 'cdef_items' Successful
Repairing Table -> 'colors' Successful
Repairing Table -> 'data_input' Successful
Repairing Table -> 'data_input_data' Successful
Repairing Table -> 'data_input_fields' Successful
Repairing Table -> 'data_local' Successful
Repairing Table -> 'data_template' Successful
Repairing Table -> 'data_template_data' Successful
Repairing Table -> 'data_template_data_rra' Successful
Repairing Table -> 'data_template_rrd' Successful
Repairing Table -> 'graph_local' Successful
Repairing Table -> 'graph_template_input' Successful
Repairing Table -> 'graph_template_input_defs' Successful
Repairing Table -> 'graph_templates' Successful
Repairing Table -> 'graph_templates_gprint' Successful
Repairing Table -> 'graph_templates_graph' Successful
Repairing Table -> 'graph_templates_item' Successful
Repairing Table -> 'graph_tree' Successful
Repairing Table -> 'graph_tree_items' Successful
Repairing Table -> 'host' Successful
Repairing Table -> 'host_graph' Successful
Repairing Table -> 'host_snmp_cache' Successful
Repairing Table -> 'host_snmp_query' Successful
Repairing Table -> 'host_template' Successful
Repairing Table -> 'host_template_graph' Successful
Repairing Table -> 'host_template_snmp_query' Successful
Repairing Table -> 'mac_track_approved_macs' Successful
Repairing Table -> 'mac_track_device_types' Successful
Repairing Table -> 'mac_track_devices' Successful
Repairing Table -> 'mac_track_interfaces' Successful
Repairing Table -> 'mac_track_ip_ranges' Successful
Repairing Table -> 'mac_track_ips' Successful
Repairing Table -> 'mac_track_macauth' Successful
Repairing Table -> 'mac_track_macwatch' Successful
Repairing Table -> 'mac_track_oui_database' Successful
Repairing Table -> 'mac_track_ports' Successful
Repairing Table -> 'mac_track_processes' Successful
Repairing Table -> 'mac_track_scan_dates' Successful
Repairing Table -> 'mac_track_scanning_functions' Successful
Repairing Table -> 'mac_track_sites' Successful
Repairing Table -> 'mac_track_temp_ports' Successful
Repairing Table -> 'mac_track_vlans' Successful
Repairing Table -> 'plugin_config' Successful
Repairing Table -> 'plugin_db_changes' Successful
Repairing Table -> 'plugin_hooks' Successful
Repairing Table -> 'plugin_realms' Successful
Repairing Table -> 'plugin_routerconfigs_accounts' Successful
Repairing Table -> 'plugin_routerconfigs_backups' Successful
Repairing Table -> 'plugin_routerconfigs_devices' Successful
Repairing Table -> 'plugin_routerconfigs_devicetypes' Successful
Repairing Table -> 'plugin_rrdclean' Successful
Repairing Table -> 'plugin_rrdclean_action' Successful
Repairing Table -> 'plugin_thold_contacts' Successful
Repairing Table -> 'plugin_thold_log' Successful
Repairing Table -> 'plugin_thold_template_contact' Successful
Repairing Table -> 'plugin_thold_threshold_contact' Successful
Repairing Table -> 'poller' Successful
Repairing Table -> 'poller_command' Successful
Repairing Table -> 'poller_item' Successful
Repairing Table -> 'poller_output' Successful
Repairing Table -> 'poller_reindex' Successful
Repairing Table -> 'poller_time' Successful
Repairing Table -> 'reportit_cache_measurands' Successful
Repairing Table -> 'reportit_cache_reports' Successful
Repairing Table -> 'reportit_cache_variables' Successful
Repairing Table -> 'reportit_measurands' Successful
Repairing Table -> 'reportit_presets' Successful
Repairing Table -> 'reportit_recipients' Successful
Repairing Table -> 'reportit_reports' Successful
Repairing Table -> 'reportit_rvars' Successful
Repairing Table -> 'reportit_templates' Successful
Repairing Table -> 'reportit_variables' Successful
Repairing Table -> 'rra' Successful
Repairing Table -> 'rra_cf' Successful
Repairing Table -> 'settings' Successful
Repairing Table -> 'settings_graphs' Successful
Repairing Table -> 'settings_tree' Successful
Repairing Table -> 'snmp_query' Successful
Repairing Table -> 'snmp_query_graph' Successful
Repairing Table -> 'snmp_query_graph_rrd' Successful
Repairing Table -> 'snmp_query_graph_rrd_sv' Successful
Repairing Table -> 'snmp_query_graph_sv' Successful
Repairing Table -> 'thold_data' Successful
Repairing Table -> 'thold_template' Successful
Repairing Table -> 'user_auth' Successful
Repairing Table -> 'user_auth_perms' Successful
Repairing Table -> 'user_auth_realm' Successful
Repairing Table -> 'user_log' Successful
Repairing Table -> 'version' Successful
Repairing Table -> 'weathermap_auth' Successful
Repairing Table -> 'weathermap_data' Successful
Repairing Table -> 'weathermap_maps' Successful
Repairing Table -> 'weathermap_settings' Successful


So no idea now - like I say if I look Graph Trees and Graph Management everything is there, just not being shown via the "graphs" tab.

Anyone know which tables this info is stored in? Maybe possible to manually add the info to the relevant tables?

Thanks.
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Also out of interest I added another Tree via Graph Trees - the poller has now run twice and the newly added tree has not been shown? So something somewhere in a table is screwed up ... that's all I can think.

J.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If possible, please pm both tree tables to me (dump those tables to SQL and tar.gz them)
R.
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Thanks, I took another look at this yesterday and can see that the 2 tables of interest are the graph_tree and graph_tree_items - so mysqldump'd them both, dropped them via mysql and recreated empty ones - so I could see that this was done no graphs are shown via the graph tab or in the console.

I then restored the graph_tree table and the empty tree's appeared, restored the graph_tree_items table and it broke again - so narrowed it down to this one table.

So dropped the graph_tree_items table again and I've restored half the records and can see those graphs now - so somewhere in the 2nd half of the records is a rogue / bad record that is causing this to break.

J.
Canto
Posts: 12
Joined: Fri Mar 05, 2010 6:43 am

Post by Canto »

Hi there,

I have the exact same problem (I reported some times ago with no luck....).
For some reason, after some changes (device addition in the tree), the tree menu get screwed up. My only solution so far is to restore mysql graph_tree_items.* files to the last known working version.
I have several users doing changes regularly but the problem doesn't appear everytime but often enough to be really annoying.

I have not been able to isolate the precise cause of the problem but I have made some observations :

By looking at the source code of the html page of a broken menu, I can see that all the items look there but for some reason some of the index get wrong. Please see below an example extracted from the html source of my menu at one time it was broken :

Code: Select all

....

ou3 = insFld(ou2, gFld("<strong>Host:</strong> bigipndc02", "graph_view.php?action=tree&tree_id=98&leaf_id=1416"))
ou3.xID = "tree_98_leaf_1416"
ou8 = insFld(ou7, gFld("Groups traffic", "graph_view.php?action=tree&tree_id=98&leaf_id=3022"))
ou8.xID = "tree_98_leaf_3022"
ou8 = insFld(ou7, gFld("Interfaces Brodcasts/Multicasts", "graph_view.php?action=tree&tree_id=98&leaf_id=3240"))
ou8.xID = "tree_98_leaf_3240"
ou8 = insFld(ou7, gFld("Interfaces Errors", "graph_view.php?action=tree&tree_id=98&leaf_id=3023"))
ou8.xID = "tree_98_leaf_3023"
ou7 = insFld(ou6, gFld("Interfaces traffic", "graph_view.php?action=tree&tree_id=98&leaf_id=3351"))
ou7.xID = "tree_98_leaf_3351"

...
On the third item, we have "ou8 = insFld(ou7 ... " which is wrong because a) a depth of 8 is not correct in my case and b) ou7 has never been created beforehand in that menu.
So all my tree menu items up to this line are correctly displayed but when this line is reached, all the following menu items are not shown because this line is in error.

To my opinion the problem appears because of two possible causes (but I am no developper so I can be wrong...) :

1) a problem in /cacti/lib/tree.php with the function tree_tier() that (to my understanding) is used to compute some kind of depth index when the menu is generated ( tree_tier() is heavily used in cacti/lib/html_tree.php ) . maybe this function returns wrong values under some circumstances...

2) as tree_tier() uses order_key as parameters (order_key is an entry in the graph_tree_items mysql table) maybe order_key value is sometimes not correct when it is inserted in the table. And so that could explain that the resulting value of tree_tier() can be wrong...

Hope this will help...
Canto
Posts: 12
Joined: Fri Mar 05, 2010 6:43 am

Post by Canto »

Cacti version 0.8.7.e for me
ttlinna
Posts: 1
Joined: Wed Jan 11, 2006 10:27 am

Is there a solution yet?

Post by ttlinna »

Canto wrote:
I have the exact same problem (I reported some times ago with no luck....).
For some reason, after some changes (device addition in the tree), the tree menu get screwed up. My only solution so far is to restore mysql graph_tree_items.* files to the last known working version.
I have several users doing changes regularly but the problem doesn't appear everytime but often enough to be really annoying.
We are facing the same problem. Many months have already gone. Is there a solution for this problem?


Cacti Version 0.8.7g
Cacti OS unix
SNMP Version NET-SNMP version: 5.3.2.2
RRDTool Version RRDTool 1.4.x
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Gandalf,

We need to add a table lock for Tree operations....

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

Post by gandalf »

TheWitness wrote:Gandalf,

We need to add a table lock for Tree operations....

TheWitness
what about using transactions instead? I fear placing a lock that's never unlocked ...
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests