[syslog-ng]Syslog-ng and Mysql

Toby Nelson [email protected]
Fri, 03 May 2002 16:14:08 -0700


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_431EA1DD.8AEBD3C6
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Can someone help me?=20
I have syslog-ng running perfectly getting all info from all of my hosts. =
I would like to take this one step farther and start adding it to a mysql =
data base. I have made the mysql.pipe using mkfifo and add the following =
lines to my syslog-ng.conf:

destination d_mysql {
                 pipe("/etc/mysql.pipe" template("INSET INTO logs(host, =
facility, priority, level, tag, date, time, program, msg) VALUES('$HOST', =
'$FACILILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', =
$HOUR:$MIN:$SEC', '$PROGRAM', $MSG');\n") template-escape(yes));
};

log {
        source("src");
        destination("d_mysql");
};

With that in place I continue to get a parse error. Can any one help?=20

Thanks,

Toby

--=_431EA1DD.8AEBD3C6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 5.50.4616.200" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><FONT size=3D1>Can someone help me? </FONT></DIV>
<DIV><FONT size=3D1>I have syslog-ng running perfectly getting all info =
from all=20
of my hosts. I would like to take this one step farther and start adding =
it to a=20
mysql data base. I have made the mysql.pipe using mkfifo and add the =
following=20
lines to my syslog-ng.conf:</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>destination d_mysql {</FONT></DIV>
<DIV><FONT=20
size=3D1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
pipe("/etc/mysql.pipe" template("INSET INTO logs(host, facility, =
priority,=20
level, tag, date, time, program, msg) VALUES('$HOST', '$FACILILITY',=20
'$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', $HOUR:$MIN:$SEC',=20
'$PROGRAM', $MSG');\n") template-escape(yes));</FONT></DIV>
<DIV><FONT size=3D1>};</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>log {</FONT></DIV>
<DIV><FONT size=3D1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
source("src");</FONT></DIV>
<DIV><FONT size=3D1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
destination("d_mysql");</FONT></DIV>
<DIV><FONT size=3D1>};</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>With that in place I continue to get a parse error. =
Can any=20
one help? </FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>Thanks,</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>Toby</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV></BODY></HTML>

--=_431EA1DD.8AEBD3C6--