| Author |
Message |
|
FreRange
New User
Joined: Fri Feb 03, 2006 5:01 pm Posts: 4
|
 Problem with Templetes
From the documentation it is my understanding that I can add a Thold templete and apply it to a device to "auto create tholds" however, any time that I attempt to add a templete with the creationg wizard I get and error.....
Error: A template with that Data Source already exists!
Im trying to apply some defaults to all my devices for thold and then "auto create" graphs based on those defaults. I can go to the devices one at a time but OMG... I have toooo many devices to do that...
Thanks for any help.
David.
|
| Wed Feb 08, 2006 12:05 pm |
|
 |
|
bigfish
New User
Joined: Mon Mar 20, 2006 11:11 am Posts: 1
|
I am having the same problem getting an error message when trying to create a new threshold template.
Error: A template with that Data Source already exists!
I am using cacti 0.8.6h and thold plugin 0.2.7. Anybody know a solution for this?
|
| Mon Mar 20, 2006 11:19 am |
|
 |
|
typhoon43
New User
Joined: Tue Mar 28, 2006 11:31 am Posts: 2
|
I'm in the exact same boat.
I also get a validation error when attempting to perform some thold setups. My mail test works fine, and my thold tab DOES show devices and has them listed as 'up', but I have no data ro ability to set thresholds. I REALLY need to test this plugin before we just go buy What'sUP Pro. I think Cacti can whip it if configured properly.
I am using cacti 0.8.6h and thold plugin 0.2.7. as well. Win2k3 SP1, IIS 6.0
|
| Tue Mar 28, 2006 11:34 am |
|
 |
|
FreRange
New User
Joined: Fri Feb 03, 2006 5:01 pm Posts: 4
|
 Re: Problem with Templetes
Soo I'm guessing that noone wants to review this issue? I'm still not working. Everytime I go to the templetes and try to create one I get
Error: A template with that Data Source already exists
If I try to go to datasources and click on the data source templete IE hangs.
Sooooo very odd.
Also, auto create states that no tholds where created.
FreRange wrote: From the documentation it is my understanding that I can add a Thold templete and apply it to a device to "auto create tholds" however, any time that I attempt to add a templete with the creationg wizard I get and error.....
Error: A template with that Data Source already exists!
Im trying to apply some defaults to all my devices for thold and then "auto create" graphs based on those defaults. I can go to the devices one at a time but OMG... I have toooo many devices to do that...
Thanks for any help. David.
|
| Wed Apr 19, 2006 2:45 pm |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
There can be 3 different things that cause the "A template with that Data Source already exists!" message to display.
1. That the "thold_template" table does not exist in the database.
2. For some unknown reason, it can not write to the table.
3. The template actually does exist in the database (but maybe not displayed). Check the table and see if its empty.
Also, please state what OS Cacti is running on, and if Windows, whether you are using IIS or Apache.
For the freezing issue, does Firefox have the same effect?
|
| Wed Apr 19, 2006 8:28 pm |
|
 |
|
FreRange
New User
Joined: Fri Feb 03, 2006 5:01 pm Posts: 4
|
Yea... The tables are there but they are empty. I dropped and readded them but I still have the same issue. All the tables (minus the import set) are empty. Here is my debug log when trying to set a thold. Please help.
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='15'"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 10:00:03 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='15'"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 10:00:02 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, name from data_template order by name"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='18'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, local_data_template_rrd_id, data_source_name, data_input_field_id from data_template_rrd where id = 4598"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, name from data_template where id=72"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='18'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 10:00:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, local_data_template_rrd_id, data_source_name, data_input_field_id from data_template_rrd where local_data_template_rrd_id = 0 and data_template_id = 72"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, name from data_template where id=72 order by name"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='18'"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 09:59:59 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 09:59:58 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id, name from data_template order by name"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='18'"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 09:59:57 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/20/2006 09:59:56 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from thold_template order by data_template_name"
04/20/2006 09:59:56 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/20/2006 09:59:56 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='34'"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from `cacti`"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='19'"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='18'"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/20/2006 09:59:55 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
|
| Thu Apr 20, 2006 12:01 pm |
|
 |
|
FreRange
New User
Joined: Fri Feb 03, 2006 5:01 pm Posts: 4
|
I'm sorry I forgot some information....
W2k3
IIS 6
MYSQL 5
latest Cacti build
Trying to set a thold via device also locks with latest build of foxfire. I have to kill the session.
|
| Thu Apr 20, 2006 12:06 pm |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
I can't really find anything wrong in the logs. I'm setting up a new 2003 test server now to try and figure it out.
|
| Thu Apr 20, 2006 7:23 pm |
|
 |
|
Ralphie
New User
Joined: Mon Jul 24, 2006 2:40 am Posts: 1
|
 Data Source already exists
The problem is probably caused by a somewhat different implementation of MySQL 5. If I'm right everyone who receives the message 'Data Source already exists' uses Mysql 5.
The PHP code for inserting NULL values in a MySQL db works for MySQL 4 but not for 5.
Until now i haven't found a decent solution but you can use the following workaround until there's a better solution:
In the script <path_cacti>/plugins/thold/thold_plugins.php, there's in the function template_add a line that says $save["notify_default"] = "NULL";
It's somewhere near line 177.
If you comment this line out by placing // in front of it, you can create threshold templates.
Now when you edit a template you still get an error if you leave the default option for "Send notifications to default alert address". You have to choose "Force: on" or "Force: off" or you won't be able to save.
FYI, this is my Cacti configuration:
Windows server 2003
IIS
MySQL 5.0.18
Cacti 0.8.6h
Thresholds 0.3.0
php 5.1.2
|
| Mon Jul 24, 2006 3:28 am |
|
 |
|
JackHack
New User
Joined: Mon Jul 24, 2006 11:07 am Posts: 10
|
 Data source already exists!
It bugged me the error in the Thold plugin for a while. I run a debugger mode and found the problem with the "Error: Data template already extsits!". Is is a data abse error because the default parameters for the notify_default is set to "NULL" but it need to go for either "On" or "Off".
I changed code on thold_template_php on line# 180
to
$save["repeat_alert"] = read_config_option("alert_repeat");
$save["notify_default"] = read_config_option("alert_notify_default");
$save["notify_extra"] = read_config_option("alert_email");
$id = sql_save($save, "thold_template");
and now it works!
May you want to update the thold plugin as well 
|
| Mon Jul 24, 2006 11:15 am |
|
|