I installed Cacti 1.20 Beta 4 today. I got Thold dev version from https://github.com/Cacti/plugin_thold (also today).
I am getting a dialog box saying:
Code: Select all
The Operation was successful. Details are below.
Record Updated
cacti.log says:
Code: Select all
2018/12/30 23:48:23 - DBCALL ERROR: SQL Save Failed for Table 'thold_data'. SQL:'INSERT INTO thold_data (`id`, `name`, `name_cache`, `host_id`, `data_template_rrd_id`, `local_data_id`, `thold_enabled`, `exempt`, `repeat_alert`, `data_template_id`, `data_source_name`, `reset_ack`, `persist_ack`, `syslog_enabled`, `syslog_priority`, `syslog_facility`, `thold_hrule_warning`, `thold_hrule_alert`, `restored_alert`, `thold_type`, `template_enabled`, `thold_hi`, `thold_low`, `thold_fail_trigger`, `time_hi`, `time_low`, `time_fail_trigger`, `time_fail_length`, `thold_warning_hi`, `thold_warning_low`, `thold_warning_fail_trigger`, `time_warning_hi`, `time_warning_low`, `time_warning_fail_trigger`, `time_warning_fail_length`, `bl_thold_valid`, `bl_ref_time_range`, `bl_pct_down`, `bl_pct_up`, `bl_fail_trigger`, `notify_extra`, `notify_warning_extra`, `notify_warning`, `notify_alert`, `notes`, `data_type`, `percent_ds`, `cdef`, `expression`, `email_body`, `email_body_warn`, `trigger_cmd_high`, `trigger_cmd_low`, `trigger_cmd_norm`, `snmp_event_category`, `snmp_event_severity`, `snmp_event_warning_severity`, `local_graph_id`, `graph_template_id`) VALUES (1, 'Local Linux Machine - Logged in Users', 'Local Linux Machine - Logged in Users', 1, 57, 3, 'on', '', 0, 0, NULL, '', '', '', 3, 0, 0, 0, '', 0, '', '1', '0', 1, '', '', 1, 1, '1', '0', 1, '', '', 1, 1, 0, 86400, '', '', 2, '', '', 0, 0, '', 0, '', 0, '', 'An Alert has been issued that requires your attention. <br><br><strong>Device</strong>: <DESCRIPTION> (<HOSTNAME>)<br><strong>URL</strong>: <URL><br><strong>Message</strong>: <SUBJECT><br><br><GRAPH>', 'A Warning has been issued that requires your attention. <br><br><strong>Device</strong>: <DESCRIPTION> (<HOSTNAME>)<br><strong>URL</strong>: <URL><br><strong>Message</strong>: <SUBJECT><br><br><GRAPH>', 'bash /scripts/device_down.sh', 'bash /scripts/device_down.sh', 'bash /scripts/device_down.sh', '', 4, 3, 3, 16) ON DUPLICATE KEY UPDATE `name`=VALUES(`name`), `name_cache`=VALUES(`name_cache`), `host_id`=VALUES(`host_id`), `data_template_rrd_id`=VALUES(`data_template_rrd_id`), `local_data_id`=VALUES(`local_data_id`), `thold_enabled`=VALUES(`thold_enabled`), `exempt`=VALUES(`exempt`), `repeat_alert`=VALUES(`repeat_alert`), `data_template_id`=VALUES(`data_template_id`), `data_source_name`=VALUES(`data_source_name`), `reset_ack`=VALUES(`reset_ack`), `persist_ack`=VALUES(`persist_ack`), `syslog_enabled`=VALUES(`syslog_enabled`), `syslog_priority`=VALUES(`syslog_priority`), `syslog_facility`=VALUES(`syslog_facility`), `thold_hrule_warning`=VALUES(`thold_hrule_warning`), `thold_hrule_alert`=VALUES(`thold_hrule_alert`), `restored_alert`=VALUES(`restored_alert`), `thold_type`=VALUES(`thold_type`), `template_enabled`=VALUES(`template_enabled`), `thold_hi`=VALUES(`thold_hi`), `thold_low`=VALUES(`thold_low`), `thold_fail_trigger`=VALUES(`thold_fail_trigger`), `time_hi`=VALUES(`time_hi`), `time_low`=VALUES(`time_low`), `time_fail_trigger`=VALUES(`time_fail_trigger`), `time_fail_length`=VALUES(`time_fail_length`), `thold_warning_hi`=VALUES(`thold_warning_hi`), `thold_warning_low`=VALUES(`thold_warning_low`), `thold_warning_fail_trigger`=VALUES(`thold_warning_fail_trigger`), `time_warning_hi`=VALUES(`time_warning_hi`), `time_warning_low`=VALUES(`time_warning_low`), `time_warning_fail_trigger`=VALUES(`time_warning_fail_trigger`), `time_warning_fail_length`=VALUES(`time_warning_fail_length`), `bl_thold_valid`=VALUES(`bl_thold_valid`), `bl_ref_time_range`=VALUES(`bl_ref_time_range`), `bl_pct_down`=VALUES(`bl_pct_down`), `bl_pct_up`=VALUES(`bl_pct_up`), `bl_fail_trigger`=VALUES(`bl_fail_trigger`), `notify_extra`=VALUES(`notify_extra`), `notify_warning_extra`=VALUES(`notify_warning_extra`), `notify_warning`=VALUES(`notify_warning`), `notify_alert`=VALUES(`notify_alert`), `notes`=VALUES(`notes`), `data_type`=VALUES(`data_type`), `percent_ds`=VALUES(`percent_ds`), `cdef`=VALUES(`cdef`), `expression`=VALUES(`expression`), `email_body`=VALUES(`email_body`), `email_body_warn`=VALUES(`email_body_warn`), `trigger_cmd_high`=VALUES(`trigger_cmd_high`), `trigger_cmd_low`=VALUES(`trigger_cmd_low`), `trigger_cmd_norm`=VALUES(`trigger_cmd_norm`), `snmp_event_category`=VALUES(`snmp_event_category`), `snmp_event_severity`=VALUES(`snmp_event_severity`), `snmp_event_warning_severity`=VALUES(`snmp_event_warning_severity`), `local_graph_id`=VALUES(`local_graph_id`), `graph_template_id`=VALUES(`graph_template_id`)'
2018/12/30 23:48:23 - CMDPHP SQL Backtrace: (/plugins/thold/thold.php[63]:save_thold(), /plugins/thold/thold_functions.php[4040]:sql_save(), /lib/database.php[1245]:_db_replace(), /lib/database.php[1175]:db_execute(), /lib/database.php[188]:db_execute_prepared())
2018/12/30 23:48:23 - CMDPHP ERROR: A DB Exec Failed!, Error: Column 'data_source_name' cannot be null
2018/12/30 23:48:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/thold.php[63]:save_thold(), /plugins/thold/thold_functions.php[3902]:CactiErrorHandler())
2018/12/30 23:48:23 - ERROR PHP NOTICE in Plugin 'thold': Undefined variable: data_source_info in file: /var/www/html/cacti/plugins/thold/thold_functions.php on line: 3902
2018/12/30 23:48:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/thold/thold.php[63]:save_thold(), /plugins/thold/thold_functions.php[3901]:CactiErrorHandler())
2018/12/30 23:48:23 - ERROR PHP NOTICE in Plugin 'thold': Undefined variable: data_source_info in file: /var/www/html/cacti/plugins/thold/thold_functions.php on line: 3901
/cacti/plugins/thold/thold.php?action=edit&id=1
This is the configuration I am putting in place (high/low alerts and bash commands): I don't know if I'm supposed to report issues on Thold development versions or not, so please just tell me if I should or not