[syslog-ng] Pipe to MYSQL does not work

Matthew Redel mredel at gmail.com
Fri Aug 25 03:17:38 CEST 2006

Running 1.6.9 version of syslog-ng.
libol version 3.9
OS is Redhat Fedora 4.
mysql version is 4.1.12 .
Below is my config:

*options { sync (0);
          time_reopen (10);
          log_fifo_size (1000);
          long_hostnames (off);
          use_dns (yes);
          use_fqdn (yes);
          create_dirs (yes);
          keep_hostname (yes);

*source s_net { udp(ip( port(514)); };*

*destination d_mysql { pipe("/tmp/mysql.pipe" template("INSERT INTO logs
(host, f
acility, priority, level, tag, date, time, program, msg) VALUES ('$HOST',
'$HOUR:$MIN:$SEC', '$
PROGRAM', '$MSG');\n") template-escape(yes));

*log { source(s_net); destination(d_mysql); };*

Here is the script used to pipe /tmp/mysql.pipe into databse:


*if [ -e /tmp/mysql.pipe ]; then
while [ -e /tmp/mysql.pipe ]
mysql -u syslog --password=password syslog < /tmp/mysql.pipe
mkfifo /tmp/mysql.pipe

I have confirmed that I can redirect echo to the pipe, so I know the pipe is
working. I've even chmod 777 the pipe. I have also confirmed that log
messages are coming in over the network using tcpdump and when I use
syslog-ng to log to file, it works just fine. Why doesn't syslog-ng output
to the pipe, argh!? Any help would be greatly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20060824/2d18ea51/attachment.html

More information about the syslog-ng mailing list