[syslog-ng]syslog-ng mysql syntax error

Lopez Fernandez, Jose syslog-ng@lists.balabit.hu
Thu, 25 Nov 2004 15:06:13 +0100


This is a multi-part message in MIME format.

------=_NextPartTM-000-26986b6e-5032-40cf-a7ed-75d9edc4cf3a
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C4D2F7.EC133C33"

------_=_NextPart_001_01C4D2F7.EC133C33
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

hi,

thats nice to know :-)
well... someone out there who has a compiled version 1.6.5 for solaris 8
/ sparc? ;-)
i have no possibility to compile it till next week :-(

regards,
Jose Lopez


------------------------------------------------------------------------
-----------
=3D20
I was having exactly the same problem with syslog-ng 1.6.4, upgrading to
1.6.5 fixed the problem.

Regards

James Masson




________________________________

	From: syslog-ng-admin@lists.balabit.hu
[mailto:HYPERLINK
"mailto:syslog-ng-admin@lists.balabit.hu"syslog-ng-admin@lists.balabit.h
u <mailto:HYPERLINK > ] On Behalf Of Lopez Fernandez,
Jose
	Sent: 25 November 2004 11:29
	To: syslog-ng@lists.balabit.hu
	Subject: [syslog-ng]syslog-ng mysql syntax error
=3D09
=3D09

	Hi,=3D20

	since some days i get errors in like this:=3D20
	ERROR 1064 at line 4: 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

	'ws-61078', 'kern', 'crit', 'crit', '02', '2004-11-24',
'10:55:=3D20

	It seems, that the Quotes after the MSG-Tag are missing. so the
insert-command for MySql isn`t complete.=3D20
	I can`t see any fault in my config.=3D20

	This is my config (syslog-ng 1.6.4):=3D20

	options {stats(28800); long_hostnames(on); sync(0);
log_fifo_size(2000); use_dns(on);  };=3D20
	     2  #=3D20
	     3  ## Log syslog-ng to mysql database=3D20
	     4  ##=3D20
	     5  destination d_mysql {=3D20
	     6  pipe("/tmp/mysql.pipe"=3D20
	     7  template("INSERT INTO logs (host, facility, priority,
level, tag, date,=3D20
	     8  time, program, msg) VALUES ( '$HOST', '$FACILITY',
'$PRIORITY', '$LEVEL', '$TAG',=3D20
	     9  '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM',
'$MSG' );\n") template-escape(yes));=3D20
	    10  };=3D20
	    11  source local { sun-streams("/dev/log") ;
internal();};=3D20
	    12  source net { udp(); };=3D20
	    13  log { source(net); destination(d_mysql);};=3D20
	    14  log { source(local); destination(d_mysql);};=3D20


	I have read, that someone had this problem too in the
mailingslist, but i didn`t find any suggestion for a workaorund=3D20
	or a solution. I`m now analysing this problem 2 days an didn`t
find any workaround / solution. Hope someone could=3D20
	help me :-)=3D20

	thanks,=3D20
	Jose Lopez=3D20

=3D09
=3D09
	Dieses Dokument ist vertraulich und ausschliesslich fuer den
Adressaten bestimmt. Falls Sie diese E-Mail versehentlich bekommen
haben, informieren Sie uns bitte unverzueglich und loeschen Sie diese
Nachricht von Ihrem Computer. Jegliche Art von Reproduktion,
Verbreitung, Vervielfaeltigung, Modifikation, Verteilung und/oder
Publikation dieser E-Mail Nachricht ist untersagt.=3D20
	Die in dieser E-Mail enthaltenen Angaben und Erklaerungen sind
unverbindlich. Haftungsansprueche des Empfaengers jeglicher Art werden
ausgeschlossen. Die GZS schliesst ausser fuer den Fall von Vorsatz oder
grober Fahrlaessigkeit die Haftung fuer jeglichen Verlust oder Schaeden
durch virenbefallene Software oder E-Mails aus.
=3D09
------------------------------------------------------------------------
-----------------------------------
	This message contains confidential information and is intended
only for the named individual. If you are not the named addressee, you
should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this message in
error and delete this e-message from your system.
	No reliance may be placed on this message without written
confirmation of its contents from an authorized representative. GZS
accepts no liability for loss or damage caused by software viruses
except in case of gross negligence or willful behaviour.
=3D09





------_=_NextPart_001_01C4D2F7.EC133C33
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6603.0">
<TITLE>syslog-ng mysql syntax error</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Courier New">hi,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">thats nice to know :-)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">well... someone out there who =
has a compiled version 1.6.5 for solaris 8 / sparc? ;-)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">i have no possibility to compile =
it till next week :-(</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">regards,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Jose Lopez</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Courier =
New">--------------------------------------------------------------------=
---------------</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D20</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">I was having exactly the same =
problem with syslog-ng 1.6.4, upgrading to</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">1.6.5 fixed the problem.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Regards</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">James Masson</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Courier =
New">________________________________</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">From: </FONT><A =
HREF=3D"mailto:syslog-ng-admin@lists.balabit.hu"><U><FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier =
New">syslog-ng-admin@lists.balabit.hu</FONT></U></A>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">[</FONT><A =
HREF=3D"mailto:HYPERLINK "><U><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier New">mailto:HYPERLINK =
&quot;mailto:syslog-ng-admin@lists.balabit.hu&quot;</FONT></U><U><FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier =
New">syslog-ng-admin@lists.balabit.hu</FONT></U></A><FONT SIZE=3D2 =
FACE=3D"Courier New">] On Behalf Of Lopez Fernandez,</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Jose</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Sent: 25 November 2004 11:29</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">To: </FONT><A =
HREF=3D"mailto:syslog-ng@lists.balabit.hu"><U><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Courier New">syslog-ng@lists.balabit.hu</FONT></U></A>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Subject: [syslog-ng]syslog-ng mysql syntax =
error</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Hi,=3D20</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">since some days i get errors in like =
this:=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">ERROR 1064 at line 4: You have an error in your SQL =
syntax.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Check the manual that =
corresponds to your MySQL server version for the</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">right syntax to use near</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">'ws-61078', 'kern', 'crit', 'crit', '02', =
'2004-11-24', '10:55:=3D20</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">It seems, that the Quotes after the MSG-Tag are =
missing. so the</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">insert-command for MySql isn`t =
complete.=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">I can`t see any fault in my config.=3D20</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">This is my config (syslog-ng 1.6.4):=3D20</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">options {stats(28800); long_hostnames(on); =
sync(0);</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">log_fifo_size(2000); =
use_dns(on);&nbsp; };=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; #=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp; ## Log syslog-ng =
to mysql database=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp; ##=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp; destination =
d_mysql {=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp; =
pipe(&quot;/tmp/mysql.pipe&quot;=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; =
template(&quot;INSERT INTO logs (host, facility, priority,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">level, tag, date,=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp; time, program, =
msg) VALUES ( '$HOST', '$FACILITY',</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">'$PRIORITY', '$LEVEL', =
'$TAG',=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; =
'$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM',</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">'$MSG' );\n&quot;) =
template-escape(yes));=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp; 10&nbsp; };=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp; 11&nbsp; source local { =
sun-streams(&quot;/dev/log&quot;) ; internal();};=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp; 12&nbsp; source net { udp(); =
};=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp; 13&nbsp; log { source(net); =
destination(d_mysql);};=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">&nbsp;&nbsp;&nbsp; 14&nbsp; log { source(local); =
destination(d_mysql);};=3D20</FONT>
</P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">I have read, that someone had this problem too in =
the</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">mailingslist, but i didn`t find =
any suggestion for a workaorund=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">or a solution. I`m now analysing this problem 2 =
days an didn`t</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">find any workaround / solution. =
Hope someone could=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">help me :-)=3D20</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">thanks,=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Jose Lopez=3D20</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Dieses Dokument ist vertraulich und ausschliesslich =
fuer den</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Adressaten bestimmt. Falls Sie =
diese E-Mail versehentlich bekommen</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">haben, informieren Sie uns bitte =
unverzueglich und loeschen Sie diese</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Nachricht von Ihrem Computer. =
Jegliche Art von Reproduktion,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Verbreitung, Vervielfaeltigung, =
Modifikation, Verteilung und/oder</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">Publikation dieser E-Mail =
Nachricht ist untersagt.=3D20</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">Die in dieser E-Mail enthaltenen Angaben und =
Erklaerungen sind</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">unverbindlich. =
Haftungsansprueche des Empfaengers jeglicher Art werden</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">ausgeschlossen. Die GZS =
schliesst ausser fuer den Fall von Vorsatz oder</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">grober Fahrlaessigkeit die =
Haftung fuer jeglichen Verlust oder Schaeden</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">durch virenbefallene Software =
oder E-Mails aus.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">--------------------------------------------------------------------=
----</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">-----------------------------------</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">This message contains confidential information and =
is intended</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">only for the named individual. =
If you are not the named addressee, you</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">should not disseminate, =
distribute or copy this e-mail. Please notify</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">the sender immediately by e-mail =
if you have received this message in</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">error and delete this e-message =
from your system.</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">No reliance may be placed on this message without =
written</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">confirmation of its contents =
from an authorized representative. GZS</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">accepts no liability for loss or =
damage caused by software viruses</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">except in case of gross =
negligence or willful behaviour.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Courier New">=3D09</FONT>
</P>
<BR>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C4D2F7.EC133C33--

------=_NextPartTM-000-26986b6e-5032-40cf-a7ed-75d9edc4cf3a--