2 Jan
2013
2 Jan
'13
9:35 a.m.
Hi all, is it possible to perform an "ON duplicate KEY UPDATE" with the sql-driver for a mysql-database? At the moment I use destination d_sql { program("/usr/bin/mysql -uUSER -pPASSWORD DATABASE" template("INSERT INTO TABLE VALUES (inet_aton('${.apache.client_ip}') ,${.apache.content_length},CURRENT_TIMESTAMP,1 ) ON duplicate KEY UPDATE bytes=bytes+${.apache.content_length}, hits=hits+1;\n") template-escape(yes)); }; without any problems. By using this destination, syslog-ng can´t use the sql-driver. I`m not sure if there is any difference between sql-driver and the destination above. regards Florian