[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


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


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

destination d_host { pipe("/var/log/mysql.pipe" template("INSERT INTO
host
 (host) 
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
 (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