[syslog-ng]syslog-ng mysql syntax error
James Masson
syslog-ng@lists.balabit.hu
Thu, 25 Nov 2004 14:34:58 +0100
=20
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:syslog-ng-admin@lists.balabit.hu] 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
=09
=09
Hi,=20
since some days i get errors in like this:=20
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:=20
It seems, that the Quotes after the MSG-Tag are missing. so the
insert-command for MySql isn`t complete.=20
I can`t see any fault in my config.=20
This is my config (syslog-ng 1.6.4):=20
options {stats(28800); long_hostnames(on); sync(0);
log_fifo_size(2000); use_dns(on); };=20
2 #=20
3 ## Log syslog-ng to mysql database=20
4 ##=20
5 destination d_mysql {=20
6 pipe("/tmp/mysql.pipe"=20
7 template("INSERT INTO logs (host, facility, priority,
level, tag, date,=20
8 time, program, msg) VALUES ( '$HOST', '$FACILITY',
'$PRIORITY', '$LEVEL', '$TAG',=20
9 '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM',
'$MSG' );\n") template-escape(yes));=20
10 };=20
11 source local { sun-streams("/dev/log") ; internal();};=20
12 source net { udp(); };=20
13 log { source(net); destination(d_mysql);};=20
14 log { source(local); destination(d_mysql);};=20
I have read, that someone had this problem too in the
mailingslist, but i didn`t find any suggestion for a workaorund=20
or a solution. I`m now analysing this problem 2 days an didn`t
find any workaround / solution. Hope someone could=20
help me :-)=20
thanks,=20
Jose Lopez=20
=09
=09
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.=20
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.
=09
------------------------------------------------------------------------
-----------------------------------
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.
=09