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