[syslog-ng]Syslog-ng and Mysql
Toby Nelson
nelsotob@ohsu.edu
Mon, 06 May 2002 08:14:09 -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.
--=_C09D27DF.AECF1330
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Yes that is actually what I have in my script is INSERT just a typo in the =
messages.
Toby
>>> sander@sanderscorner.com 05/04/02 04:39AM >>>
(Response to message from Toby Nelson, nelsotob@ohsu.edu)
Hello Toby,
Should'nt it be 'template("INSERT INTO...'?
--=20
Regards,
Sander
Saturday, May 04, 2002, 1:14:08 AM, you wrote:
> 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-e=
scape(yes));
> };
_______________________________________________
syslog-ng maillist - syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
--=_C09D27DF.AECF1330
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML
<!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>Yes that is actually what I have in my script is =
INSERT just a=20
typo in the messages.</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1>Toby</FONT></DIV>
<DIV><BR><BR>>>> sander@sanderscorner.com 05/04/02 04:39AM=20
>>><BR>(Response to message from Toby Nelson,=20
nelsotob@ohsu.edu)<BR><BR>Hello Toby,<BR><BR>Should'nt it be 'template("INS=
ERT=20
INTO...'?<BR><BR>-- <BR><BR>Regards,<BR>Sander<BR><BR>Saturday, May 04, =
2002,=20
1:14:08 AM, you wrote:<BR><BR>> Can someone help me? <BR>> I have=20
syslog-ng running perfectly getting all info from all of my hosts. I would =
like=20
to take this one step farther and start adding it to a mysql data base. I =
have=20
made the mysql.pipe using<BR>> mkfifo and add the following lines to =
my=20
syslog-ng.conf:<BR><BR>> destination d_mysql=20
{<BR>> =
=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',<BR>> '$YEAR-$MONTH-$DAY', $HOUR:$MIN:$SEC=
',=20
'$PROGRAM', $MSG');\n") template-escape(yes));<BR>>=20
};<BR><BR><BR>_______________________________________________<BR>syslog-ng=
=20
maillist - syslog-ng@lists.balabit.hu<BR><A=20
href=3D"https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.=
balabit.hu/mailman/listinfo/syslog-ng</A><BR></DIV></BODY></HTML>
--=_C09D27DF.AECF1330--