Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 20, 2019 4:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Thold plugin will not save configuration/settings.
PostPosted: Sun Dec 30, 2018 5:57 pm 
Offline

Joined: Tue Mar 31, 2015 4:54 pm
Posts: 11
Hello,

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:
The Operation was successful. Details are below.
Record Updated


But the values are not updated. After refreshing the page the fields are empty.

cacti.log says:

Code:
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


The path is
/cacti/plugins/thold/thold.php?action=edit&id=1

This is the configuration I am putting in place (high/low alerts and bash commands):
Attachment:
Skärmbild från 2018-12-30 23-53-15.png
Skärmbild från 2018-12-30 23-53-15.png [ 67.46 KiB | Viewed 259 times ]


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 ;)


Top
 Profile  
 
 Post subject: Re: Thold plugin will not save configuration/settings.
PostPosted: Mon Dec 31, 2018 2:38 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
I would get the previous release of thold as the dev version is work in progress and is undergoing a major update at the moment so probably isn't working 100%

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Thold plugin will not save configuration/settings.
PostPosted: Mon Dec 31, 2018 5:44 pm 
Offline

Joined: Tue Mar 31, 2015 4:54 pm
Posts: 11
Oh, I was hoping to test; https://github.com/Cacti/plugin_thold/issues/82
Seems that its not ready to test yet.

Thanks.


Top
 Profile  
 
 Post subject: Re: Thold plugin will not save configuration/settings.
PostPosted: Tue Jan 01, 2019 9:56 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Let me try and trace the issue. I'm doing the update. Was this a stand alone threshold or template based?

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject: Re: Thold plugin will not save configuration/settings.
PostPosted: Wed Jan 02, 2019 6:45 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Okay, I've solved the issue in question. Keep testing. Some things are not entirely done. For example creating a Graph from a Threshold Template.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject: Re: Thold plugin will not save configuration/settings.
PostPosted: Sat Mar 16, 2019 4:03 am 
Offline

Joined: Tue Mar 31, 2015 4:54 pm
Posts: 11
Hi, it seems that I forgot to reply, thanks for fixing this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group