logo       

mysql pipe not working!: msg#00052

syslog-ng

Subject: mysql pipe not working!

I setup syslog-ng to pipe to a fifo (/tmp/mysql.pipe). I copied and pasted the
configs exactly as was given and no data is written to the pipe. It always
remains "0" in size. I have since tried the config in many different ways, but
still cannot get the data to pipe to the file. Is there something wrong with
the config? Has anyone else run into this problem? Here is a copy of my
config.

root@syslog1 ~ # cat /etc/syslog-ng/syslog-ng.conf
#
# Syslog-ng configuration for for ODJFS-NOC Syslog
#
# Copyright (c) 1999 anonymous
# Copyright (c) 1999 Balazs Scheidler
# $Id: syslog-ng.conf.sample,v 1.2 1999/11/15 12:30:41 bazsi Exp $
#
# Syslog-ng configuration file, compatible with default Debian syslogd
# installation.
#

options {
use_fqdn(yes);
use_dns(yes);
keep_hostname(yes);
long_hostnames(off);
use_time_recvd(yes);
sync(0);
};
######################################
#Source Section
#source for local data
source src { unix-dgram("/etc/log/log"); internal(); };
#source src { pipe("/proc/kmsg" log_prefix("kernel: "));
# unix-stream("/dev/log");
# internal();
#};

#source for PIX firewalls
#source pix {
# udp(ip("10.3.250.5") port (514));
# udp(ip("10.x.x.x") port (514));
# udp(ip("10.x.x.x") port (514));
# udp(ip("10.x.x.x") port (514));
# udp(ip("10.x.x.x") port (514));
#};

#source for network devices
source net {
udp();
};

#####################################
#Destination Section
#Standard destination
destination std {
file("/var/log/$HOST/$FACILITY/$DAY"
remove_if_older(172800)
owner(root)
group(root)
perm(0600)
dir_perm(0700)
create_dirs(yes));
};

## Log syslog-ng to mysql database
##
destination d_mysql {
pipe("/tmp/mysql.pipe"
template("INSERT INTO logs (host, facility, priority, level, tag, date,
time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL',
'$TAG',
'$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n")
template-escape(yes));
};

#log for src
log {
source(src);
destination(std);
destination(d_mysql);
};

#log for net
log {
source(net);
destination(std);
destination(d_mysql);
};

########END OF FILE########

Any ideas?

Tim M.
ODJFS
_______________________________________________
syslog-ng maillist - syslog-ng@xxxxxxxxxxxxxxxx
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise