On Mon, May 15, 2006 at 05:36:43PM -0500, Carlos Mario Medina Marín wrote: > 16:22:53 db_ping(mysql) Connection to DB Restored... 16:22:54 db_ping(mysql) > Connection to DB Restored... 16:22:55 db_ping(mysql) Connection to DB > Restored... 16:22:56 db_ping(mysql) Connection to DB Restored... 16:22:57 > db_ping(mysql) Connection to DB Restored... Query failed - > db_update(slas_cond) - Update slas_cond set description = 'CPU Utilization > > 40%',event = 'CPU > 40%',condition = '',variable_show = '',variable_show_info > = '%' where slas_cond.id = '24' - You have an error in your SQL syntax; check > the manual that corresponds to your MySQL server version for the right syntax > to use near 'condition = '',variable_show = '',variable_show_info = '%' where > slas_cond.' at line 1
A problem with the word "condition". I patched the Debian version of JFFNMS to fix this. I've attached that patch. - Craig -- Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5 Eye-Net Consulting http://www.enc.com.au/ MIEE Debian developer csmall at : enc.com.au ieee.org debian.org
#! /bin/sh /usr/share/dpatch/dpatch-run ## 10-slacond.dpatch by <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Change sla.condition row so it works with newer MySQLs @DPATCH@ diff -urNad jffnms-0.8.2~/docs/jffnms-0.8.2.mysql jffnms-0.8.2/docs/jffnms-0.8.2.mysql --- jffnms-0.8.2~/docs/jffnms-0.8.2.mysql 2006-02-03 09:00:39.000000000 +1100 +++ jffnms-0.8.2/docs/jffnms-0.8.2.mysql 2006-02-03 09:01:07.000000000 +1100 @@ -931,7 +931,7 @@ DROP TABLE IF EXISTS slas_cond; CREATE TABLE slas_cond ( id int(10) NOT NULL auto_increment, - condition char(250) NOT NULL default '', + cond char(250) NOT NULL default '', description char(60) NOT NULL default '', event char(60) NOT NULL default '', variable_show char(250) NOT NULL default '', diff -urNad jffnms-0.8.2~/docs/jffnms-0.8.2.pgsql jffnms-0.8.2/docs/jffnms-0.8.2.pgsql --- jffnms-0.8.2~/docs/jffnms-0.8.2.pgsql 2006-02-03 09:00:39.000000000 +1100 +++ jffnms-0.8.2/docs/jffnms-0.8.2.pgsql 2006-02-03 09:01:30.000000000 +1100 @@ -2203,7 +2203,7 @@ CREATE TABLE slas_cond ( id INT4 DEFAULT nextval('slas_cond_id_seq'), - condition varchar(250) NOT NULL default '', + cond varchar(250) NOT NULL default '', description varchar(60) NOT NULL default '', event varchar(60) NOT NULL default '', variable_show varchar(250) NOT NULL default '', diff -urNad jffnms-0.8.2~/engine/analyzers/sla.inc.php jffnms-0.8.2/engine/analyzers/sla.inc.php --- jffnms-0.8.2~/engine/analyzers/sla.inc.php 2006-02-03 09:00:39.000000000 +1100 +++ jffnms-0.8.2/engine/analyzers/sla.inc.php 2006-02-03 09:01:59.000000000 +1100 @@ -39,7 +39,7 @@ $query_sla=" SELECT - slas_cond.condition, slas_cond.description, slas_cond.event, + slas_cond.cond, slas_cond.description, slas_cond.event, slas_sla_cond.show_in_result, slas_cond.variable_show, slas_cond.variable_show_info FROM slas_cond, slas_sla_cond @@ -51,7 +51,8 @@ while ($sla = db_fetch_array($result_sla)) { - $sla_cond = replace_vars(trim($sla["condition"]),$values); + $sla_cond = + replace_vars(trim($sla["cond"]),$values); $sla_variable_show = replace_vars(trim($sla["variable_show"]),$values); $sla_variable_show_info = replace_vars(trim($sla["variable_show_info"]),$values); $sla["event"] = replace_vars(trim($sla["event"]),$values);