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