[syslog-ng] problems with mysql pipe

javier rojas javier.rojasr at gmail.com
Tue Aug 2 15:30:45 CEST 2005


hello,


i'm having trouble with the template i created to pipe to mysql (acording to 
php-syslog-ng), at first it was working fine but then (i started messing 
around) and it just stop working, i had configure syslog-ng to store logs 
coming from server A into mysql and on a text file, here's my syslog-ng.conf
:

## 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 { source(net); destination(d_mysql); };

## Log on to text file
##
destination hosts {
file("/var/log/$HOST.$FACILITY"
owner(root) group(root) perm(0600) dir_perm(0700)
create_dirs(yes));
};

log {source(net); destination(hosts); };

#Then comment out this line --

# This is the default behavior of sysklogd package
# Logs may come from unix stream, but not from another machine.
#
#source src { unix-dgram("/dev/log"); internal(); };

#Then uncomment out this line --

# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
source src { unix-dgram("/dev/log"); internal(); };
source net { udp(); };


it actually worked, but i don't know what i did, i see the logs coming from 
server A (#tcpdump host server A and port 514) but it doesn't store them on 
mysql...

help please!!!

-- 
Ciao,Javier
linux user #393724
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20050802/995a73d0/attachment.htm


More information about the syslog-ng mailing list