Cacti database

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

Moderators: Developers, Moderators

Post Reply
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Cacti database

Post by adriansekowski »

Hi all,

Recently, I've cleared a bunch of errors on my cacti.log, and I was already able to fix most of them except this:

2023-11-14 08:52:12 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'mailtime' in 'where clause'
2023-11-14 08:55:10: CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'user_id' in 'where clause

I know so far these were added somewhere in the cacti 1.0.0x due to further research, but I could not resolve this by running repair scripts from the cacti folder. I tried several times. There are topics that are really old and not really shown more than running a script.

The story behind this server is that it wasn't updated for years, then we started to update it (0.8.8c to 1.2.21), keeping it up to date (1.2.25), and also the recent migration from CentOS 7.9 to Ubuntu 22.04.
Is there any difference? I've also changed from MySQL to MariaDB.

Has anyone experienced it and also found a solution to get rid of these errors?
Last edited by adriansekowski on Tue Nov 14, 2023 3:31 am, edited 1 time in total.
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Cacti database

Post by macan »

It seems that your database isn't updated. Make backup and try to run
php /paht/to/cacti/cli/upgrade_database.php --forcever=1.0.0
Let the Cacti grow!
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Re: Cacti database

Post by adriansekowski »

Hi Macan,
I've tried it several times already and no good results.

Code: Select all

php /var/www/cacti/cli/upgrade_database.php --forcever=1.0.0
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.0
Upgrading from v1.0.0 (DB 1.2.25) to v1.0.4
-Upgrading from v1.0.4 (DB 1.2.25) to v1.0.5
+++++++++++++Upgrading from v1.0.5 (DB 1.2.25) to v1.1.2
-----++Upgrading from v1.1.2 (DB 1.2.25) to v1.1.4
------------++-----------Upgrading from v1.1.4 (DB 1.2.25) to v1.1.6
+--++------------+Upgrading from v1.1.6 (DB 1.2.25) to v1.1.7
+Upgrading from v1.1.7 (DB 1.2.25) to v1.1.8
+Upgrading from v1.1.8 (DB 1.2.25) to v1.1.11
+++Upgrading from v1.1.11 (DB 1.2.25) to v1.1.14
+Upgrading from v1.1.14 (DB 1.2.25) to v1.1.17
+Upgrading from v1.1.17 (DB 1.2.25) to v1.1.20
++++++++++++++++++Upgrading from v1.1.20 (DB 1.2.25) to v1.1.26
------Upgrading from v1.1.26 (DB 1.2.25) to v1.1.28
-----Upgrading from v1.1.28 (DB 1.2.25) to v1.1.31
+++++Upgrading from v1.1.31 (DB 1.2.25) to v1.1.34
--------+--++++++-+-++-+-++-+++-+++++++++-+-+++++-++++++Upgrading from v1.1.34 (DB 1.2.25) to v1.1.35
+++Upgrading from v1.1.35 (DB 1.2.25) to v1.1.36
++Upgrading from v1.1.36 (DB 1.2.25) to v1.1.37
+Upgrading from v1.1.37 (DB 1.2.25) to v1.2.0
++++++++++++++-++++++++++++++++++++++++++++Upgrading from v1.2.0 (DB 1.2.25) to v1.2.1
++Upgrading from v1.2.1 (DB 1.2.25) to v1.2.2
++Upgrading from v1.2.2 (DB 1.2.25) to v1.2.3
++++++Upgrading from v1.2.3 (DB 1.2.25) to v1.2.5
+++Upgrading from v1.2.5 (DB 1.2.25) to v1.2.7
-Upgrading from v1.2.7 (DB 1.2.25) to v1.2.8
+++++Upgrading from v1.2.8 (DB 1.2.25) to v1.2.11
+Upgrading from v1.2.11 (DB 1.2.25) to v1.2.14
+Upgrading from v1.2.14 (DB 1.2.25) to v1.2.15
+Upgrading from v1.2.15 (DB 1.2.25) to v1.2.17
++++++Upgrading from v1.2.17 (DB 1.2.25) to v1.2.19
++++Upgrading from v1.2.19 (DB 1.2.25) to v1.2.20
Upgrading from v1.2.20 (DB 1.2.25) to v1.2.21
----------++-Upgrading from v1.2.21 (DB 1.2.25) to v1.2.22
+Upgrading from v1.2.22 (DB 1.2.25) to v1.2.23
++Upgrading from v1.2.23 (DB 1.2.25) to v1.2.25
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Cacti database

Post by macan »

try to run cli/analyze_database.php

ouuu, sorry, it should have been a different file audit_database.php
Last edited by macan on Mon Nov 20, 2023 3:50 am, edited 1 time in total.
Let the Cacti grow!
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti database

Post by TheWitness »

Make that run this script:

Code: Select all

php -q audit_database.php --report  // To see what is broken
php -q audit_database.php --repair  // To report what is broken
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?
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Re: Cacti database

Post by adriansekowski »

I think most of it caused by plugins that are not used anymore?

Code: Select all

[root@app1-prod-cacti.triple.ams2 cli ]# php -q audit_database.php --report
WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
SUCCESS: Loaded the Audit Schema
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates_graph'             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates_item'              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs_graph_item'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs_items'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_devices'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_graph_rule_items'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_graph_rules'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_ips'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_match_rule_items'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_networks'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_processes'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_snmp'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_snmp_items'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_templates'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_templates_rules'                  - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'automation_tree_rule_items'                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_tree_rules'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'cdef'                                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'cdef_items'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'color_template_items'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'color_templates'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'colors'                                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_debug'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input_data'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input_fields'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_local'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles_cf'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles_rra'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_purge_action'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_purge_temp'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_command_cache'             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_daily'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly_cache'              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly_last'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_monthly'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_weekly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_yearly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template_data'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template_rrd'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'external_links'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_local'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_template_input'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_template_input_defs'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_gprint'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_graph'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_item'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_tree'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_tree_items'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host'                                       
WARNING Col: 'monitor', does not exist in default Cacti.  Plugin possible
WARNING Col: 'monitor_text', does not exist in default Cacti.  Plugin possible

ERRORS: 0, WARNINGS: 2
---------------------------------------------------------------------------------------------
Checking Table: 'host_graph'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_snmp_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_snmp_query'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template_graph'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template_snmp_query'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_value_cache'                            - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'intrvl'                                      - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_CereusTransporter_data'               - Plugin Detected
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_config'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_db_changes'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_fix64bit'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_hooks'                                - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_realms'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_rrdclean'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_rrdclean_action'                      - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_spikekill_templates'                  - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'poller'                                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_command'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_data_template_field_mappings'         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_item'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost_local_data_ids'          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost_processes'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_realtime'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_reindex'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_resource_cache'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_time'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_time_stats'                           - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'processes'                                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_measurands'                         - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_reports'                            - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_results_2'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_rrdlist_2'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_rvars'                              - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_templates'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_variables'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reports'                                    
ERROR Col: 'id', Attribute 'Type' invalid. Should be: 'mediumint(8) unsigned', Is: 'int(10)'
WARNING Col: 'hour', does not exist in default Cacti.  Plugin possible
WARNING Col: 'minute', does not exist in default Cacti.  Plugin possible
WARNING Col: 'rtype', does not exist in default Cacti.  Plugin possible
ERROR Col: 'lastsent', Attribute 'Type' invalid. Should be: 'bigint(20) unsigned', Is: 'int(32)'
WARNING Col: 'daytype', does not exist in default Cacti.  Plugin possible
WARNING Col: 'user_id' is missing from 'reports'
WARNING Col: 'cformat' is missing from 'reports'
WARNING Col: 'format_file' is missing from 'reports'
WARNING Col: 'font_size' is missing from 'reports'
WARNING Col: 'alignment' is missing from 'reports'
WARNING Col: 'graph_linked' is missing from 'reports'
WARNING Col: 'intrvl' is missing from 'reports'
WARNING Col: 'count' is missing from 'reports'
WARNING Col: 'offset' is missing from 'reports'
WARNING Col: 'mailtime' is missing from 'reports'
WARNING Col: 'subject' is missing from 'reports'
WARNING Col: 'from_name' is missing from 'reports'
WARNING Col: 'from_email' is missing from 'reports'
WARNING Col: 'bcc' is missing from 'reports'
WARNING Col: 'attachment_type' is missing from 'reports'
WARNING Col: 'graph_height' is missing from 'reports'
WARNING Col: 'graph_width' is missing from 'reports'
WARNING Col: 'graph_columns' is missing from 'reports'
WARNING Col: 'thumbnails' is missing from 'reports'
WARNING Col: 'enabled' is missing from 'reports'
WARNING Index: 'id', does not exist in default Cacti.  Dropping.
ERROR Index: 'mailtime', is missing from 'reports'
ERROR Index: 'PRIMARY', is missing from 'reports'

ERRORS: 25, WARNINGS: 4
---------------------------------------------------------------------------------------------
Checking Table: 'reports_data'                                - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reports_items'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'rrdcheck'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'sessions'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_tree'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_user'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_user_group'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'sites'                                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_rrd'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_rrd_sv'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_sv'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache_notifications'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache_textual_conventions'         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_managers'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_managers_notifications'            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_mibs'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_notifications_log'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'table_columns'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'table_indexes'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'thold'                                       - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'tholdset'                                    - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth'                                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_members'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_perms'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_realm'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_perms'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_realm'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_row_cache'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_domains'                                - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_domains_ldap'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_id'                                     - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'user_log'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'vdef'                                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'vdef_items'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'version'                                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_auth'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_data'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_groups'                           - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_maps'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_settings'                         - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
ERRORS are fixable using the --repair option.  WARNINGS will not be repaired
due to ambiguous use of the column.
Repair option seems to be not working in my case. Any suggestions how to get rid of these? :D
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Cacti database

Post by macan »

Run
php -q audit_database.php --repair
and after
php -q audit_database.php --report
again
Let the Cacti grow!
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Re: Cacti database

Post by adriansekowski »

Alright, this is what I get no matter how many time I run:

Report:

Code: Select all

WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
SUCCESS: Loaded the Audit Schema
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates_graph'             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graph_templates_item'              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs_graph_item'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'aggregate_graphs_items'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_devices'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_graph_rule_items'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_graph_rules'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_ips'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_match_rule_items'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_networks'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_processes'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_snmp'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_snmp_items'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_templates'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_templates_rules'                  - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'automation_tree_rule_items'                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'automation_tree_rules'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'cdef'                                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'cdef_items'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'color_template_items'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'color_templates'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'colors'                                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_debug'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input_data'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_input_fields'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_local'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles_cf'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_profiles_rra'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_purge_action'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_purge_temp'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_command_cache'             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_daily'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly_cache'              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_hourly_last'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_monthly'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_weekly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_source_stats_yearly'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template_data'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'data_template_rrd'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'external_links'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_local'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_template_input'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_template_input_defs'                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_gprint'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_graph'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_templates_item'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_tree'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'graph_tree_items'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host'                                       
WARNING Col: 'monitor', does not exist in default Cacti.  Plugin possible
WARNING Col: 'monitor_text', does not exist in default Cacti.  Plugin possible

ERRORS: 0, WARNINGS: 2
---------------------------------------------------------------------------------------------
Checking Table: 'host_graph'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_snmp_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_snmp_query'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template_graph'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_template_snmp_query'                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'host_value_cache'                            - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'intrvl'                                      - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_CereusTransporter_data'               - Plugin Detected
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_config'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_db_changes'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_fix64bit'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_hooks'                                - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_realms'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_rrdclean'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_rrdclean_action'                      - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'plugin_spikekill_templates'                  - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'poller'                                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_command'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_data_template_field_mappings'         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_item'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost_local_data_ids'          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_boost_processes'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_output_realtime'                      - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_reindex'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_resource_cache'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_time'                                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'poller_time_stats'                           - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'processes'                                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_measurands'                         - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_reports'                            - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_results_2'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_rrdlist_2'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_rvars'                              - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_templates'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reportit_variables'                          - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reports'                                    
ERROR Col: 'id', Attribute 'Type' invalid. Should be: 'mediumint(8) unsigned', Is: 'int(10)'
WARNING Col: 'hour', does not exist in default Cacti.  Plugin possible
WARNING Col: 'minute', does not exist in default Cacti.  Plugin possible
WARNING Col: 'rtype', does not exist in default Cacti.  Plugin possible
ERROR Col: 'lastsent', Attribute 'Type' invalid. Should be: 'bigint(20) unsigned', Is: 'int(32)'
WARNING Col: 'daytype', does not exist in default Cacti.  Plugin possible
WARNING Col: 'user_id' is missing from 'reports'
WARNING Col: 'cformat' is missing from 'reports'
WARNING Col: 'format_file' is missing from 'reports'
WARNING Col: 'font_size' is missing from 'reports'
WARNING Col: 'alignment' is missing from 'reports'
WARNING Col: 'graph_linked' is missing from 'reports'
WARNING Col: 'intrvl' is missing from 'reports'
WARNING Col: 'count' is missing from 'reports'
WARNING Col: 'offset' is missing from 'reports'
WARNING Col: 'mailtime' is missing from 'reports'
WARNING Col: 'subject' is missing from 'reports'
WARNING Col: 'from_name' is missing from 'reports'
WARNING Col: 'from_email' is missing from 'reports'
WARNING Col: 'bcc' is missing from 'reports'
WARNING Col: 'attachment_type' is missing from 'reports'
WARNING Col: 'graph_height' is missing from 'reports'
WARNING Col: 'graph_width' is missing from 'reports'
WARNING Col: 'graph_columns' is missing from 'reports'
WARNING Col: 'thumbnails' is missing from 'reports'
WARNING Col: 'enabled' is missing from 'reports'
WARNING Index: 'id', does not exist in default Cacti.  Dropping.
ERROR Index: 'mailtime', is missing from 'reports'
ERROR Index: 'PRIMARY', is missing from 'reports'

ERRORS: 25, WARNINGS: 4
---------------------------------------------------------------------------------------------
Checking Table: 'reports_data'                                - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'reports_items'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'rrdcheck'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'sessions'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_tree'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_user'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'settings_user_group'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'sites'                                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph'                            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_rrd'                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_rrd_sv'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmp_query_graph_sv'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache_notifications'               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_cache_textual_conventions'         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_managers'                          - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_managers_notifications'            - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_mibs'                              - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'snmpagent_notifications_log'                 - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'table_columns'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'table_indexes'                               - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'thold'                                       - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'tholdset'                                    - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth'                                   - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_cache'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_members'                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_perms'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_group_realm'                       - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_perms'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_realm'                             - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_auth_row_cache'                         - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_domains'                                - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_domains_ldap'                           - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'user_id'                                     - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'user_log'                                    - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'vdef'                                        - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'vdef_items'                                  - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'version'                                     - Clean
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_auth'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_data'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_groups'                           - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_maps'                             - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
Checking Table: 'weathermap_settings'                         - Does not Exist.  Possible Plugin
---------------------------------------------------------------------------------------------
ERRORS are fixable using the --repair option.  WARNINGS will not be repaired
due to ambiguous use of the column.
---------------------------------------------------------------------------------------------
Repair:

Code: Select all

[root@app1-prod-cacti.triple.ams2 cli ]# php -q audit_database.php --repair
WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
SUCCESS: Loaded the Audit Schema
Scanning Table: 'aggregate_graph_templates'                   - Completed
Scanning Table: 'aggregate_graph_templates_graph'             - Completed
Scanning Table: 'aggregate_graph_templates_item'              - Completed
Scanning Table: 'aggregate_graphs'                            - Completed
Scanning Table: 'aggregate_graphs_graph_item'                 - Completed
Scanning Table: 'aggregate_graphs_items'                      - Completed
Scanning Table: 'automation_devices'                          - Completed
Scanning Table: 'automation_graph_rule_items'                 - Completed
Scanning Table: 'automation_graph_rules'                      - Completed
Scanning Table: 'automation_ips'                              - Completed
Scanning Table: 'automation_match_rule_items'                 - Completed
Scanning Table: 'automation_networks'                         - Completed
Scanning Table: 'automation_processes'                        - Completed
Scanning Table: 'automation_snmp'                             - Completed
Scanning Table: 'automation_snmp_items'                       - Completed
Scanning Table: 'automation_templates'                        - Completed
Scanning Table: 'automation_templates_rules'                  - Completed
Scanning Table: 'automation_tree_rule_items'                  - Completed
Scanning Table: 'automation_tree_rules'                       - Completed
Scanning Table: 'cdef'                                        - Completed
Scanning Table: 'cdef_items'                                  - Completed
Scanning Table: 'color_template_items'                        - Completed
Scanning Table: 'color_templates'                             - Completed
Scanning Table: 'colors'                                      - Completed
Scanning Table: 'data_debug'                                  - Completed
Scanning Table: 'data_input'                                  - Completed
Scanning Table: 'data_input_data'                             - Completed
Scanning Table: 'data_input_fields'                           - Completed
Scanning Table: 'data_local'                                  - Completed
Scanning Table: 'data_source_profiles'                        - Completed
Scanning Table: 'data_source_profiles_cf'                     - Completed
Scanning Table: 'data_source_profiles_rra'                    - Completed
Scanning Table: 'data_source_purge_action'                    - Completed
Scanning Table: 'data_source_purge_temp'                      - Completed
Scanning Table: 'data_source_stats_command_cache'             - Completed
Scanning Table: 'data_source_stats_daily'                     - Completed
Scanning Table: 'data_source_stats_hourly'                    - Completed
Scanning Table: 'data_source_stats_hourly_cache'              - Completed
Scanning Table: 'data_source_stats_hourly_last'               - Completed
Scanning Table: 'data_source_stats_monthly'                   - Completed
Scanning Table: 'data_source_stats_weekly'                    - Completed
Scanning Table: 'data_source_stats_yearly'                    - Completed
Scanning Table: 'data_template'                               - Completed
Scanning Table: 'data_template_data'                          - Completed
Scanning Table: 'data_template_rrd'                           - Completed
Scanning Table: 'external_links'                              - Completed
Scanning Table: 'graph_local'                                 - Completed
Scanning Table: 'graph_template_input'                        - Completed
Scanning Table: 'graph_template_input_defs'                   - Completed
Scanning Table: 'graph_templates'                             - Completed
Scanning Table: 'graph_templates_gprint'                      - Completed
Scanning Table: 'graph_templates_graph'                       - Completed
Scanning Table: 'graph_templates_item'                        - Completed
Scanning Table: 'graph_tree'                                  - Completed
Scanning Table: 'graph_tree_items'                            - Completed
Scanning Table: 'host'                                        - Completed
Scanning Table: 'host_graph'                                  - Completed
Scanning Table: 'host_snmp_cache'                             - Completed
Scanning Table: 'host_snmp_query'                             - Completed
Scanning Table: 'host_template'                               - Completed
Scanning Table: 'host_template_graph'                         - Completed
Scanning Table: 'host_template_snmp_query'                    - Completed
Scanning Table: 'host_value_cache'                            - Completed
Scanning Table: 'intrvl'                                      - Completed
Scanning Table: 'plugin_CereusTransporter_data'               - Completed
Scanning Table: 'plugin_config'                               - Completed
Scanning Table: 'plugin_db_changes'                           - Completed
Scanning Table: 'plugin_fix64bit'                             - Completed
Scanning Table: 'plugin_hooks'                                - Completed
Scanning Table: 'plugin_realms'                               - Completed
Scanning Table: 'plugin_rrdclean'                             - Completed
Scanning Table: 'plugin_rrdclean_action'                      - Completed
Scanning Table: 'plugin_spikekill_templates'                  - Completed
Scanning Table: 'poller'                                      - Completed
Scanning Table: 'poller_command'                              - Completed
Scanning Table: 'poller_data_template_field_mappings'         - Completed
Scanning Table: 'poller_item'                                 - Completed
Scanning Table: 'poller_output'                               - Completed
Scanning Table: 'poller_output_boost'                         - Completed
Scanning Table: 'poller_output_boost_local_data_ids'          - Completed
Scanning Table: 'poller_output_boost_processes'               - Completed
Scanning Table: 'poller_output_realtime'                      - Completed
Scanning Table: 'poller_reindex'                              - Completed
Scanning Table: 'poller_resource_cache'                       - Completed
Scanning Table: 'poller_time'                                 - Completed
Scanning Table: 'poller_time_stats'                           - Completed
Scanning Table: 'processes'                                   - Completed
Scanning Table: 'reportit_measurands'                         - Completed
Scanning Table: 'reportit_reports'                            - Completed
Scanning Table: 'reportit_results_2'                          - Completed
Scanning Table: 'reportit_rrdlist_2'                          - Completed
Scanning Table: 'reportit_rvars'                              - Completed
Scanning Table: 'reportit_templates'                          - Completed
Scanning Table: 'reportit_variables'                          - Completed
Scanning Table: 'reports'                                     - Completed
Scanning Table: 'reports_data'                                - Completed
Scanning Table: 'reports_items'                               - Completed
Scanning Table: 'rrdcheck'                                    - Completed
Scanning Table: 'sessions'                                    - Completed
Scanning Table: 'settings'                                    - Completed
Scanning Table: 'settings_tree'                               - Completed
Scanning Table: 'settings_user'                               - Completed
Scanning Table: 'settings_user_group'                         - Completed
Scanning Table: 'sites'                                       - Completed
Scanning Table: 'snmp_query'                                  - Completed
Scanning Table: 'snmp_query_graph'                            - Completed
Scanning Table: 'snmp_query_graph_rrd'                        - Completed
Scanning Table: 'snmp_query_graph_rrd_sv'                     - Completed
Scanning Table: 'snmp_query_graph_sv'                         - Completed
Scanning Table: 'snmpagent_cache'                             - Completed
Scanning Table: 'snmpagent_cache_notifications'               - Completed
Scanning Table: 'snmpagent_cache_textual_conventions'         - Completed
Scanning Table: 'snmpagent_managers'                          - Completed
Scanning Table: 'snmpagent_managers_notifications'            - Completed
Scanning Table: 'snmpagent_mibs'                              - Completed
Scanning Table: 'snmpagent_notifications_log'                 - Completed
Scanning Table: 'table_columns'                               - Completed
Scanning Table: 'table_indexes'                               - Completed
Scanning Table: 'thold'                                       - Completed
Scanning Table: 'tholdset'                                    - Completed
Scanning Table: 'user_auth'                                   - Completed
Scanning Table: 'user_auth_cache'                             - Completed
Scanning Table: 'user_auth_group'                             - Completed
Scanning Table: 'user_auth_group_members'                     - Completed
Scanning Table: 'user_auth_group_perms'                       - Completed
Scanning Table: 'user_auth_group_realm'                       - Completed
Scanning Table: 'user_auth_perms'                             - Completed
Scanning Table: 'user_auth_realm'                             - Completed
Scanning Table: 'user_auth_row_cache'                         - Completed
Scanning Table: 'user_domains'                                - Completed
Scanning Table: 'user_domains_ldap'                           - Completed
Scanning Table: 'user_id'                                     - Completed
Scanning Table: 'user_log'                                    - Completed
Scanning Table: 'vdef'                                        - Completed
Scanning Table: 'vdef_items'                                  - Completed
Scanning Table: 'version'                                     - Completed
Scanning Table: 'weathermap_auth'                             - Completed
Scanning Table: 'weathermap_data'                             - Completed
Scanning Table: 'weathermap_groups'                           - Completed
Scanning Table: 'weathermap_maps'                             - Completed
Scanning Table: 'weathermap_settings'                         - Completed
---------------------------------------------------------------------------------------------
Executing Alter for Table : reports - Failed
ALTER TABLE `reports`
   MODIFY COLUMN `id` mediumint(8) unsigned NOT NULL auto_increment,
   MODIFY COLUMN `lastsent` bigint(20) unsigned NOT NULL DEFAULT '0',
   ADD COLUMN `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `id`,
   ADD COLUMN `cformat` char(2) NOT NULL DEFAULT '' AFTER `name`,
   ADD COLUMN `format_file` varchar(255) NOT NULL DEFAULT '' AFTER `cformat`,
   ADD COLUMN `font_size` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `format_file`,
   ADD COLUMN `alignment` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `font_size`,
   ADD COLUMN `graph_linked` char(2) NOT NULL DEFAULT '' AFTER `alignment`,
   ADD COLUMN `intrvl` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `graph_linked`,
   ADD COLUMN `count` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `intrvl`,
   ADD COLUMN `offset` int(10) unsigned NOT NULL DEFAULT '0' AFTER `count`,
   ADD COLUMN `mailtime` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `offset`,
   ADD COLUMN `subject` varchar(64) NOT NULL DEFAULT '' AFTER `mailtime`,
   ADD COLUMN `from_name` varchar(40) NOT NULL AFTER `subject`,
   ADD COLUMN `from_email` text NOT NULL AFTER `from_name`,
   ADD COLUMN `bcc` text NOT NULL AFTER `email`,
   ADD COLUMN `attachment_type` smallint(2) unsigned NOT NULL DEFAULT '1' AFTER `bcc`,
   ADD COLUMN `graph_height` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `attachment_type`,
   ADD COLUMN `graph_width` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `graph_height`,
   ADD COLUMN `graph_columns` smallint(2) unsigned NOT NULL DEFAULT '0' AFTER `graph_width`,
   ADD COLUMN `thumbnails` char(2) NOT NULL DEFAULT '' AFTER `graph_columns`,
   ADD COLUMN `enabled` char(2) AFTER `lastsent`,
   DROP INDEX id,
   ADD INDEX `mailtime` (`mailtime`) USING BTREE,
   DROP PRIMARY KEY,
   ADD PRIMARY KEY (`id`) USING BTREE,
   ROW_FORMAT=Dynamic CHARSET=utf8mb4;
---------------------------------------------------------------------------------------------
Repair Completed!  0 Alters succeeded and 1 failed!
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti database

Post by TheWitness »

Do you have another reporting plugin installed? It seems that your reports table is significantly different. Are you using Reports in Cacti? If not, drop that table and take the default from the cacti.sql file.
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?
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Re: Cacti database

Post by adriansekowski »

I don't use reporting at all. I don't see any additional plugins, but I guess in the past it could have been used. I hadthe thold and wehatermap plugins, but currently they are uninstalled.

How can I drop these tables safely?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti database

Post by TheWitness »

Well, one of the tables may be problematic. I have to see if maybe I missed something in the audit database. For sure, drop the reports table and recreate and before you drop the others, simply look into the cacti.sql file. If the table is not found, and you don't have plugins installed, I think it's safe to drop.
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?
adriansekowski
Posts: 9
Joined: Fri Oct 27, 2023 8:42 am

Re: Cacti database

Post by adriansekowski »

Alright, this seems to be a solution. For now, I know for sure that these tables are not used anymore. Thanks!
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti database

Post by phalek »

As a note:

I came to the same issue with 1.2.25, couldn't save any reports as the user_id column was missing. I ended up dropping and re-creating the reports and reports_items tables using the template from the cacti.sql file.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest