[syslog-ng] Issues getting data into a MYSQL Database
Chris Killian
chriskilian at gmail.com
Wed Dec 27 17:07:45 CET 2006
All, I have without any issues setup syslog-ng with Mysql using the script
that I found called syslog2mysql.sh which is shown below.
#!/bin/bash
if [ ! -e /var/log/mysql.pipe ]
then
mkfifo /var/log/mysql.pipe
fi
while [ -e /var/log/mysql.pipe ]
do
mysql -u syslogfeeder --password=ergosum syslog <
/var/log/mysql.pipe >/dev/null
done
This works fine with most devices however I have added a new one and no
messages are being recieved, this is what happens when I strace the process.
viper:/home/chrisk# strace -p 13232
Process 13232 attached - interrupt to quit
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
write(2, "ERROR", 5) = 5
write(2, " at line 13", 11) = 11
write(2, ": Unknown command \'\\\'\'.\n", 24) = 24
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(3, 0x8060318, 16384) = -1 EAGAIN (Resource temporarily
unavailable)
fcntl64(3, F_SETFL, O_RDWR) = 0
write(3, "\1\0\0\0\1", 5) = 5
shutdown(3, 2 /* send and receive */) = 0
close(3) = 0
exit_group(1) = ?
Process 13232 detached
viper:/home/chrisk#
The process dies and it restarted with nothing being put into the database.
Anyone got any ideas at all??
Regards
Chris K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20061227/42fafc64/attachment.html
More information about the syslog-ng
mailing list