When you not able to add any new server in cacti. When you not able to view any server graph reading in cacti.
That means your cacti database is corrupted or crashed. Check the MySQL log and confirm the same.
[root@local ~]# tail -f /var/log/mysqld.log
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
MySQL log showing cacti database is corrupted or crashed. Follow the below steps to repair it.
STEP 1:- Check the corrupted table.
[root@localhost ~]# mysqlcheck -c cacti -p
Enter password:
cacti.cdef OK
cacti.cdef_items OK
cacti.colors OK
cacti.data_input OK
cacti.data_input_data
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_input_fields OK
cacti.data_local
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template OK
cacti.data_template_data
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template_data_rra
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template_rrd
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_local
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_template_input OK
cacti.graph_template_input_defs OK
cacti.graph_templates
warning : 1 client is using or hasn't closed the table properly
status : OK
cacti.graph_templates_gprint OK
cacti.graph_templates_graph
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_templates_item
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_tree OK
cacti.graph_tree_items
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host
warning : 5 clients are using or haven't closed the table properly
status : OK
cacti.host_graph
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_snmp_cache
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_snmp_query
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_template OK
cacti.host_template_graph OK
cacti.host_template_snmp_query OK
cacti.plugin_config OK
cacti.plugin_db_changes OK
cacti.plugin_hooks OK
cacti.plugin_realms OK
cacti.plugin_thold_contacts OK
cacti.plugin_thold_log OK
cacti.plugin_thold_template_contact OK
cacti.plugin_thold_threshold_contact OK
cacti.poller OK
cacti.poller_command
warning : 2 clients are using or haven't closed the table properly
status : OK
cacti.poller_item
warning : Table is marked as crashed
warning : 4 clients are using or haven't closed the table properly
error : Checksum for key: 4 doesn't match checksum for records
warning : Found 204104 deleted space. Should be 203016
warning : Found 1358 deleted blocks Should be: 1324
error : Corrupt
cacti.poller_output OK
cacti.poller_reindex
warning : 5 clients are using or haven't closed the table properly
status : OK
cacti.poller_time OK
cacti.rra OK
cacti.rra_cf OK
cacti.settings
warning : 9 clients are using or haven't closed the table properly
status : OK
cacti.settings_graphs OK
cacti.settings_tree OK
cacti.snmp_query OK
cacti.snmp_query_graph OK
cacti.snmp_query_graph_rrd OK
cacti.snmp_query_graph_rrd_sv OK
cacti.snmp_query_graph_sv OK
cacti.thold_data OK
cacti.thold_template OK
cacti.user_auth OK
cacti.user_auth_perms OK
cacti.user_auth_realm OK
cacti.user_log
warning : 4 clients are using or haven't closed the table properly
status : OK
cacti.version OK
STEP 2:- Run the below command twice to repair cacti database.
[root@localhost ~]# mysqlcheck -p --auto-repair --databases cacti
Enter password:
cacti.cdef OK
cacti.cdef_items OK
cacti.colors OK
cacti.data_input OK
cacti.data_input_data OK
cacti.data_input_fields OK
cacti.data_local OK
cacti.data_template OK
cacti.data_template_data OK
cacti.data_template_data_rra OK
cacti.data_template_rrd OK
cacti.graph_local OK
cacti.graph_template_input OK
cacti.graph_template_input_defs OK
cacti.graph_templates OK
cacti.graph_templates_gprint OK
cacti.graph_templates_graph OK
cacti.graph_templates_item OK
cacti.graph_tree OK
cacti.graph_tree_items OK
cacti.host OK
cacti.host_graph OK
cacti.host_snmp_cache OK
cacti.host_snmp_query OK
cacti.host_template OK
cacti.host_template_graph OK
cacti.host_template_snmp_query OK
cacti.plugin_config OK
cacti.plugin_db_changes OK
cacti.plugin_hooks OK
cacti.plugin_realms OK
cacti.plugin_thold_contacts OK
cacti.plugin_thold_log OK
cacti.plugin_thold_template_contact OK
cacti.plugin_thold_threshold_contact OK
cacti.poller OK
cacti.poller_command OK
cacti.poller_item OK
cacti.poller_output OK
cacti.poller_reindex OK
cacti.poller_time OK
cacti.rra OK
cacti.rra_cf OK
cacti.settings OK
cacti.settings_graphs OK
cacti.settings_tree OK
cacti.snmp_query OK
cacti.snmp_query_graph OK
cacti.snmp_query_graph_rrd OK
cacti.snmp_query_graph_rrd_sv OK
cacti.snmp_query_graph_sv OK
cacti.thold_data OK
cacti.thold_template OK
cacti.user_auth OK
cacti.user_auth_perms OK
cacti.user_auth_realm OK
cacti.user_log OK
cacti.version OK
You get the OK every line that means, all the tables are repaired successfully.
That means your cacti database is corrupted or crashed. Check the MySQL log and confirm the same.
[root@local ~]# tail -f /var/log/mysqld.log
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
120131 16:25:01 [ERROR] /usr/libexec/mysqld: Table './cacti/poller_item' is marked as crashed and should be repaired
MySQL log showing cacti database is corrupted or crashed. Follow the below steps to repair it.
STEP 1:- Check the corrupted table.
[root@localhost ~]# mysqlcheck -c cacti -p
Enter password:
cacti.cdef OK
cacti.cdef_items OK
cacti.colors OK
cacti.data_input OK
cacti.data_input_data
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_input_fields OK
cacti.data_local
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template OK
cacti.data_template_data
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template_data_rra
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.data_template_rrd
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_local
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_template_input OK
cacti.graph_template_input_defs OK
cacti.graph_templates
warning : 1 client is using or hasn't closed the table properly
status : OK
cacti.graph_templates_gprint OK
cacti.graph_templates_graph
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_templates_item
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.graph_tree OK
cacti.graph_tree_items
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host
warning : 5 clients are using or haven't closed the table properly
status : OK
cacti.host_graph
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_snmp_cache
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_snmp_query
warning : 3 clients are using or haven't closed the table properly
status : OK
cacti.host_template OK
cacti.host_template_graph OK
cacti.host_template_snmp_query OK
cacti.plugin_config OK
cacti.plugin_db_changes OK
cacti.plugin_hooks OK
cacti.plugin_realms OK
cacti.plugin_thold_contacts OK
cacti.plugin_thold_log OK
cacti.plugin_thold_template_contact OK
cacti.plugin_thold_threshold_contact OK
cacti.poller OK
cacti.poller_command
warning : 2 clients are using or haven't closed the table properly
status : OK
cacti.poller_item
warning : Table is marked as crashed
warning : 4 clients are using or haven't closed the table properly
error : Checksum for key: 4 doesn't match checksum for records
warning : Found 204104 deleted space. Should be 203016
warning : Found 1358 deleted blocks Should be: 1324
error : Corrupt
cacti.poller_output OK
cacti.poller_reindex
warning : 5 clients are using or haven't closed the table properly
status : OK
cacti.poller_time OK
cacti.rra OK
cacti.rra_cf OK
cacti.settings
warning : 9 clients are using or haven't closed the table properly
status : OK
cacti.settings_graphs OK
cacti.settings_tree OK
cacti.snmp_query OK
cacti.snmp_query_graph OK
cacti.snmp_query_graph_rrd OK
cacti.snmp_query_graph_rrd_sv OK
cacti.snmp_query_graph_sv OK
cacti.thold_data OK
cacti.thold_template OK
cacti.user_auth OK
cacti.user_auth_perms OK
cacti.user_auth_realm OK
cacti.user_log
warning : 4 clients are using or haven't closed the table properly
status : OK
cacti.version OK
STEP 2:- Run the below command twice to repair cacti database.
[root@localhost ~]# mysqlcheck -p --auto-repair --databases cacti
Enter password:
cacti.cdef OK
cacti.cdef_items OK
cacti.colors OK
cacti.data_input OK
cacti.data_input_data OK
cacti.data_input_fields OK
cacti.data_local OK
cacti.data_template OK
cacti.data_template_data OK
cacti.data_template_data_rra OK
cacti.data_template_rrd OK
cacti.graph_local OK
cacti.graph_template_input OK
cacti.graph_template_input_defs OK
cacti.graph_templates OK
cacti.graph_templates_gprint OK
cacti.graph_templates_graph OK
cacti.graph_templates_item OK
cacti.graph_tree OK
cacti.graph_tree_items OK
cacti.host OK
cacti.host_graph OK
cacti.host_snmp_cache OK
cacti.host_snmp_query OK
cacti.host_template OK
cacti.host_template_graph OK
cacti.host_template_snmp_query OK
cacti.plugin_config OK
cacti.plugin_db_changes OK
cacti.plugin_hooks OK
cacti.plugin_realms OK
cacti.plugin_thold_contacts OK
cacti.plugin_thold_log OK
cacti.plugin_thold_template_contact OK
cacti.plugin_thold_threshold_contact OK
cacti.poller OK
cacti.poller_command OK
cacti.poller_item OK
cacti.poller_output OK
cacti.poller_reindex OK
cacti.poller_time OK
cacti.rra OK
cacti.rra_cf OK
cacti.settings OK
cacti.settings_graphs OK
cacti.settings_tree OK
cacti.snmp_query OK
cacti.snmp_query_graph OK
cacti.snmp_query_graph_rrd OK
cacti.snmp_query_graph_rrd_sv OK
cacti.snmp_query_graph_sv OK
cacti.thold_data OK
cacti.thold_template OK
cacti.user_auth OK
cacti.user_auth_perms OK
cacti.user_auth_realm OK
cacti.user_log OK
cacti.version OK
You get the OK every line that means, all the tables are repaired successfully.