[syslog-ng] Nothing is logged
naim abu darwish
ad.naim at gmail.com
Fri Aug 26 09:48:02 CEST 2005
Hi,
I'm trying to setup a central logging server to get logs from many hosts on
a network, and store in a mysql database. I followed the following docs::
http://gentoo-wiki.com/HOWTO_setup_PHP-Syslog-NG
http://vermeer.org/docs/1
only nothing is being logged :D
my syslog-ng.conf so far::
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.c
onf.gentoo,v 1.5 2005/05/12 05:46:10 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux
# contributed by Michael Sterrett
options {
chain_hostnames(off);
keep_hostname(yes);
log_fifo_size(1024);
sync(0);
# The default action of syslog-ng 1.6.0 is to log a STATS line
# to the file every 10 minutes. That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats(43200);
};
source shell {
unix-dgram("/dev/log");
internal();
#tcp( port(5141) keep-alive(yes) max-connections(3000));
udp(ip(0.0.0.0 <http://0.0.0.0>),port(514));
};
source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };
source net {udp(); };
destination messages { file("/var/log/messages"); };
# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };
log { source(src); destination(messages); };
log { source(src); destination(console_all); };
log { source(shell); filter(allstuff);destination(testfile); };
log { source(net); destination(testfile); };
filter allstuff { host("194.146.*"); };
# pipe messages to /var/log/mysql.pipe to be processed by mysql
destination d_mysql { pipe("/var/log/mysql.pipe" template("INSERT INTO logs
(host, facility, priority, level, tag, datetime, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG',
'$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC',
'$PROGRAM', '$MSG' );\n") template-escape(yes)); };
#destination testfile {
destination testfile {
file("/var/log/test/$HOST/zab.log"
sync(0) log_fifo_size(10) create_dirs(yes)
owner(root) group(system) perm(0660) dir_perm(0770));
};
i suspected something wrong with the way i setup mysql database.. thats why
i added the last bit, to log to a text file, still nothing .. i cant figure
out what else could be wrong.
Any help appreciated.
Greets,
Naim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20050826/ec52ed86/attachment.htm
More information about the syslog-ng
mailing list