Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Error SQL

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold)
Author Message
cyrill
Cacti User


Joined: 25 Jan 2008
Posts: 268
Location: California - USA

PostPosted: Mon Feb 25, 2008 1:45 am    Post subject: Error SQL Reply with quote

HEllo ! I've the following error

Code:

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
Back to top
cyrill
Cacti User


Joined: 25 Jan 2008
Posts: 268
Location: California - USA

PostPosted: Fri Feb 29, 2008 1:50 am    Post subject: Reply with quote

I've always this errror...
Back to top
cyrill
Cacti User


Joined: 25 Jan 2008
Posts: 268
Location: California - USA

PostPosted: Tue Mar 04, 2008 1:39 am    Post subject: Reply with quote

please I need help. It's a serious error and I can't keep it
Back to top
cyrill
Cacti User


Joined: 25 Jan 2008
Posts: 268
Location: California - USA

PostPosted: Thu Mar 13, 2008 1:35 am    Post subject: Reply with quote

I always this error
Back to top
airwalk
Cacti User


Joined: 18 Aug 2006
Posts: 103
Location: MSK, RU

PostPosted: Fri Mar 14, 2008 5:20 am    Post subject: Reply with quote

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.


untitled.PNG
 Description:
 Filesize:  30.05 KB
 Viewed:  4204 Time(s)

untitled.PNG


Back to top
killshoot



Joined: 26 Mar 2008
Posts: 34

PostPosted: Wed Mar 26, 2008 4:50 am    Post subject: Reply with quote

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 "
Back to top
Vins



Joined: 12 Sep 2006
Posts: 43

PostPosted: Fri Mar 28, 2008 4:42 am    Post subject: Reply with quote

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...
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Apr 08, 2008 7:04 pm    Post subject: Reply with quote

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

TheWitness
Back to top
bookweb



Joined: 14 Apr 2008
Posts: 7

PostPosted: Thu Apr 17, 2008 3:13 am    Post subject: Reply with quote

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

thanks
christian
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 94
Location: RU

PostPosted: Wed Apr 23, 2008 9:48 am    Post subject: Reply with quote

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

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

         $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");
Back to top
cyrill
Cacti User


Joined: 25 Jan 2008
Posts: 268
Location: California - USA

PostPosted: Wed Jul 09, 2008 12:51 am    Post subject: Reply with quote

hello ! I've always the problem... It is fixed ?
Back to top
kasimong



Joined: 02 Oct 2007
Posts: 35
Location: Bremerhaven,Bremen,Germany

PostPosted: Wed Jul 30, 2008 2:24 am    Post subject: Reply with quote

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 "
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Wed Jul 30, 2008 5:04 am    Post subject: Reply with quote

Two posts up for the fix.

Regards,

TheWitness
Back to top
zorrosam
Cacti User


Joined: 03 May 2007
Posts: 153
Location: Italy

PostPosted: Fri Sep 26, 2008 6:11 am    Post subject: problem applying the patch Reply with quote

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
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 94
Location: RU

PostPosted: Fri Sep 26, 2008 6:14 am    Post subject: Reply with quote

Code:
'' $rra_ids");

but not
Code:
" $rra_ids");
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group