Cacti / plugin_thold

Thold Plugin for Cacti
GNU General Public License v2.0
61 stars 60 forks source link

Latest upgrade from 1.7 to 1.8 develop branch, bunch of error on missing index #609

Closed arno-st closed 10 months ago

arno-st commented 11 months ago

I just upgrade Thold this morning on my test server, and I got a few error, I didn't have it on my last update in Production (dated 8 of August)

And I didn't follow what is status stability of the develop branch as of today.

so here is my log: 28/08/2023 09:40:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /plugins/thold/includes/polling.php[299]:thold_check_threshold(), /plugins/thold/thold_functions.php[2539]:get_email_subject(), /plugins/thold/thold_functions.php[3553]:CactiErrorHandler()) 28/08/2023 09:40:20 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: email_subject_restoral in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 3553 28/08/2023 09:40:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /plugins/thold/includes/polling.php[299]:thold_check_threshold(), /plugins/thold/thold_functions.php[2539]:get_email_subject(), /plugins/thold/thold_functions.php[3490]:CactiErrorHandler()) 28/08/2023 09:40:20 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: decimals in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 3490 28/08/2023 09:40:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /plugins/thold/includes/polling.php[299]:thold_check_threshold(), /plugins/thold/thold_functions.php[2539]:get_email_subject(), /plugins/thold/thold_functions.php[3490]:CactiErrorHandler()) 28/08/2023 09:40:20 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: decimals in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 3490 28/08/2023 09:40:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /plugins/thold/includes/polling.php[299]:thold_check_threshold(), /plugins/thold/thold_functions.php[2539]:get_email_subject(), /plugins/thold/thold_functions.php[3489]:CactiErrorHandler()) 28/08/2023 09:40:20 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: units_suffix in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 3489 28/08/2023 09:40:20 - CMDPHP SQL Backtrace: (/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /plugins/thold/includes/polling.php[299]:thold_check_threshold(), /plugins/thold/thold_functions.php[2211]:get_thold_emails(), /plugins/thold/thold_functions.php[7239]:get_thold_notification_emails(), /plugins/thold/thold_functions.php[7246]:thold_notification_list_enabled(), /plugins/thold/thold_functions.php[7272]:db_fetch_assoc(), /lib/database.php[677]:db_fetch_assoc_prepared(), /lib/database.php[697]:db_execute_prepared()) 28/08/2023 09:40:20 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'enabled' in 'field list'

TheWitness commented 11 months ago

What happens if you do the following in SQL

UPDATE plugin_config SET version='1.7' WHERE directory='thold';

Then go to the Thold tab to upgrade?

arno-st commented 11 months ago

No error this time

except: 29/08/2023 07:26:44 - PLUGIN WARNING: Plugin 'thold' is attempting to call 'api_plugin_register_hook' improperly in function 'thold_setup_database' 29/08/2023 07:26:44 - PLUGIN WARNING: Plugin 'thold' is attempting to call 'api_plugin_register_hook' improperly in function 'thold_setup_database'

TheWitness commented 11 months ago

Are you at 1.2.25?

arno-st commented 11 months ago

oups 1.2.24

TheWitness commented 11 months ago

Yea, that issue will go away if you had kept your INFO file at 1.2.25 and simply updated. We are in freeze right now only hitting critical bugs. So, won't be too much longer.

TheWitness commented 10 months ago

Cacti 1.2.25 is out. Once you upgrade, you should be able to use the procedure above. Let me know.

arno-st commented 10 months ago

OK I don't have this message into the log anymore. I change thold to 1.7 (in the DB), then do a disable-> enable

the version change to 1.8 (correct) and no error message into the log.

I close the incident.

thanks for the work

TheWitness commented 10 months ago

Keep testing. I'm thinking of releasing 1.8 as I keep having to push off work to complete the 2.0 roadmap due to other priorities taking my free time at the moment.