Error SQL

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Error SQL

Post by cyrill »

HEllo ! I've the following error

Code: Select all

02/25/2008 07:50:15 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '' AND "
A red error is never nice...

please help me
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

I've always this errror...
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

please I need help. It's a serious error and I can't keep it
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

I always this error
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

Hi, I get the same error as well. If I downgrade from 0.3.9 to 0.3.8 then it goes away. Has anything been changed in DB in 0.3.9? thold.sql appears to be the same for both versions.
Attachments
untitled.PNG
untitled.PNG (30.05 KiB) Viewed 16212 times
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

I also have the same error on a fresh install (cacti 0.87 / PA 2.1 / thold 3.9 )


03/26/2008 10:40:13 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '' AND "
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Same problem descripted in this thread

http://forums.cacti.net/about25175.html

with a workaround wich only skips the red line on the log file... :-?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Definitely t-hold related. You need to hook up with Jimmy.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
bookweb
Posts: 8
Joined: Mon Apr 14, 2008 5:12 am

Post by bookweb »

is this fixed by now?
i have the same problem on my cacti 0.8.7b

thanks
christian
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

To disable this error occuring I change thold/setup.php:197
before:

Code: Select all

			$rrd_update_array_reindexed[$item['local_data_id']] = $item['times'][key($item['times'])];
			$x++;
		}
	}

	$thold_items = db_fetch_assoc("select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data
						 LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id)
						 WHERE data_template_rrd.data_source_name != '' AND $rra_ids");
After:

Code: Select all

			$rrd_update_array_reindexed[$item['local_data_id']] = $item['times'][key($item['times'])];
			$x++;
		}
	}
	$rra_ids = ((strlen(trim($rra_ids)) > 0) ? "AND " . $rra_ids : "");

	$thold_items = db_fetch_assoc("select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data
						 LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id)
						 WHERE data_template_rrd.data_source_name != '' $rra_ids");
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

hello ! I've always the problem... It is fixed ?
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
kasimong
Posts: 40
Joined: Tue Oct 02, 2007 7:54 am
Location: Bremerhaven,Bremen,Germany

Post by kasimong »

me too

07/30/2008 09:10:38 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id) WHERE data_template_rrd.data_source_name != '' AND "
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Two posts up for the fix.

Regards,

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

problem applying the patch

Post by zorrosam »

sorry,

when i apply the new line of the codes cacti die.

why?

The lines that i add are :

$rra_ids = ((strlen(trim($rra_ids)) > 0) ? "AND " . $rra_ids : "");

$thold_items = db_fetch_assoc("select thold_data.cdef, thold_data.rra_id, thold_data.data_id, thold_data.lastread, thold_data.oldvalue, data_template_rrd.data_source_name as name, data_template_rrd.data_source_type_id from thold_data
LEFT JOIN data_template_rrd on (data_template_rrd.id = thold_data.data_id)
WHERE data_template_rrd.data_source_name != '' $rra_ids");

any info is appreciate

sam
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Code: Select all

'' $rra_ids"); 
but not

Code: Select all

" $rra_ids"); 
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests