OS: OpenSUSE 10.1 x64
Syslog does not seem to be working very well with me. I used http://forums.cacti.net/viewtopic.php?t=15495 as a reference to fix it up a bit. Here are my configs:
/etc/syslog-ng/syslog-ng.conf.in
Code: Select all
#
# Syslog/Haloe Plugin config
#
destination named_pipe {
pipe("/var/log/mysql.pipe"
template("INSERT INTO syslog (facility, priority, date, time, host, message, seq)
VALUES ( '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$HOST', '$MESSAGE', '$SEQ');\n") template-escape(yes));
};
log { source(src); destination(named_pipe); };
/usr/local/sbin/syslog-ng.sh
Code: Select all
#!/bin/bash
if [ -e /var/log/mysql.pipe ]; then
while [ -e /var/log/mysql.pipe ]
do
mysql -u <myun>--password=<mypw> syslog < /var/log/mysql.pipe
done
else
mkfifo /var/log/mysql.pipe
fi
#!/bin/bash
When I execute the code it just kind of hangs, and I can't seem to be able to view the mysql.pipe file in /var/log. Syslog does not seem to be picking anything up, either.
I tried running the script then restarting the syslog service, turning off syslog then running the script followed by turning it back on, etc. So, now I wait!
Just wondering if anything looks funky... besides the syslog-ng.conf.in thing.
Any suggestions?
Thank you all, again!