[syslog-ng]syslog-ng and MySQL
Fleet, James
james.fleet@upbna.com
Mon, 13 Jan 2003 12:57:52 -0600
> Hello,
>
> I have been trying to create a syslog server with MySQL and with several
> attempts it does not work. I have attached my configs for the system which
> runs on Linux RH 7.3.
>
>
> This is my syslog-ng.conf file :
>
> #
> # Syslog-ng example configuration file showing all the existing/future
> # features.
> #
> # Copyright (c) 1999 Balazs Scheidler
> # $Id: syslog-ng.conf.demo,v 1.2 1999/11/15 12:30:41 bazsi Exp $
> #
> # Note that some of the keywords do _nothing_, this includes:
> # mac, authentication, encryption, compress
> #
>
> #options { sync(0); time_reopen(10); log_fifo_size(100); };
> ## 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);
>
> };
> #source src {
> # unix-stream("/dev/log");
> # udp();
> # tcp(ip("127.0.0.1") port(1000) mac(allow) authentication(required)
> encrypt(allow));
> # tcp();
> # sun-streams("/dev/log" door("/etc/.syslog_door"));
> # internal();
> #};
> source src { unix-dgram("/etc/log/log"); internal(); };
> source net { udp(); };
>
> #log { source(src); destination(everything); };
>
>
> I also have this script running which says that /tmp/msql.pipe is my fifo
> directory.
>
> But I am still not receiving logs into the database but when I switch it
> will log to messages.
>
>
> -James Fleet -
>
> Systems Engineer
> Union Planters Bank
>
>
>
>
>
>
>
>
>
>
>
>
>
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1