Can't create threshold

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
frankah123
Posts: 1
Joined: Fri Jan 18, 2013 9:13 am

Can't create threshold

Post by frankah123 »

Hi Guys,

I am not able to create a threshold in cacti. I hae installed this plugin without any issue. I was able to save a threshold which was created from a graph. But it is not showing on 'thold' page. Also when I try to create a threshold template I am getting following error.

Error: A template with that Data Source already exists!

Cacti Version 0.8.8a
thold Version 0.4.9-3

mysql Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1

PHP 5.2.17 (cli) (built: Jan 7 2011 10:40:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.

CentOS release 6.3 (Final)

The only thing i have seen in logs is as below.

================
01/18/2013 08:15:00 AM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
01/18/2013 08:15:00 AM - SYSTEM STATS: Time:298.1660 Method:cmd.php Processes:5 Threads:N/A Hosts:101 HostsPerProcess:21 DataSources:194 RRDsProcessed:97
01/18/2013 08:15:00 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT * FROM thold_data WHERE thold_enabled='on' AND tcheck=1"
01/18/2013 08:15:00 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE thold_data SET tcheck=0'
01/18/2013 08:15:00 AM - SYSTEM THOLD STATS: Time:0.0035 Tholds:0 DownHosts:0
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3221, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3224, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3227, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3230, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3233, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 3236, NOW(), '0000-00-00 00:00:00')'
01/18/2013 08:15:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3236'
01/18/2013 08:15:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3221'
01/18/2013 08:15:04 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3224'
01/18/2013 08:15:04 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3227'
01/18/2013 08:15:06 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3230'
01/18/2013 08:15:06 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_time SET end_time=NOW() WHERE pid=3233'
================

The cacti database is below.

==================
| cache_archive |
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_notification_lists |
| plugin_realms |
| plugin_thold_contacts |
| plugin_thold_host_failed |
| plugin_thold_log |
| plugin_thold_template_contact |
| plugin_thold_threshold_contact |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| thold_data |
| thold_template |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+--------------------------------+
==================


Description of thold_template is below.

+----------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+------------------+------+-----+---------+----------------+
| id | int(11) | NO | MUL | NULL | auto_increment |
| data_template_id | int(32) | NO | | 0 | |
| data_template_name | varchar(100) | NO | | | |
| data_source_id | int(10) | NO | PRI | 0 | |
| data_source_name | varchar(100) | NO | | | |
| data_source_friendly | varchar(100) | NO | | | |
| thold_hi | varchar(100) | YES | | NULL | |
| thold_low | varchar(100) | YES | | NULL | |
| thold_fail_trigger | int(10) | YES | | 1 | |
| thold_enabled | enum('on','off') | NO | | on | |
| bl_enabled | enum('on','off') | NO | | off | |
| bl_ref_time | int(50) | YES | | NULL | |
| bl_ref_time_range | int(10) | YES | | NULL | |
| bl_pct_down | varchar(100) | YES | | NULL | |
| bl_pct_up | varchar(100) | YES | | NULL | |
| bl_fail_trigger | int(10) | YES | | NULL | |
| bl_alert | int(2) | YES | | NULL | |
| repeat_alert | int(10) | NO | | 12 | |
| notify_extra | text | YES | | NULL | |
| cdef | int(11) | NO | | 0 | |
+----------------------+------------------+------+-----+---------+----------------+

Any suggestion on this will be appreciated.

Regards,
Frank
:(
Larry80
Posts: 1
Joined: Tue Feb 05, 2013 1:11 am

Re: Can't create threshold

Post by Larry80 »

Try this:
1 Disable and uninstall thold in the plugin management page;
2 mannually drop table thold_data,thold_template;
3 install and enable thold in the plugin management page.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests