[syslog-ng] Splitting a single source to multiple mysql tables

Dukes Clayton Clayton.Dukes at HCAhealthcare.com
Tue Mar 7 23:42:30 CET 2006

Here's what I have, why doesn't it work?

destination d_mysql { pipe("/var/log/mysql.pipe" template("INSERT INTO
 (host, facility, priority, level, datetime, msg)
'$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC','$MSG' );\n") template-esc

destination d_host { pipe("/var/log/mysql.pipe" template("INSERT INTO
VALUES ( '$HOST' ) ON DUPLICATE KEY UPDATE count=count+1;\n")
template-escape(yes)); };
destination d_mysql_facility { pipe("/var/log/mysql.pipe"
template("INSERT IGNORE INTO facility
VALUES ( '$FACILITY' );\n") template-escape(yes)); };

# This doesn't work
#log { source(net); destination(d_mysql); destination(d_host);
destination(d_mysql_facility); }; 

# This works
 log { source(net); destination(d_mysql); };

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20060307/c0e60887/attachment.htm

More information about the syslog-ng mailing list