[syslog-ng]Syslog-ng and Mysql

Toby Nelson nelsotob@ohsu.edu
Mon, 06 May 2002 08:24:54 -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.

--=_530EB471.AECF133E
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

1.4.15

>>> Michael.Earls@chmcc.org 05/06/02 08:13AM >>>
what ver of syslog-ng?

    -----Original Message-----
From: nelsotob@ohsu.edu=20
Sent: Monday, May 06, 2002 11:14 AM
To: <syslog-ng@lists.balabit.hu>
Subject: Re: [syslog-ng]Syslog-ng and Mysql



    Yes that is actually what I have in my script is INSERT just a
typo in the messages.=20

    Toby=20


    >>> sander@sanderscorner.com 05/04/02 04:39AM >>>=20
(Response to message from Toby Nelson, nelsotob@ohsu.edu)=20

    Hello Toby,=20

    Should'nt it be 'template("INSERT INTO...'?=20

      =20

    Regards,=20
Sander=20

    Saturday, May 04, 2002, 1:14:08 AM, you wrote:=20

    > 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:=20

    > destination d_mysql {=20
>                =20
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));=20
> };=20


    _______________________________________________=20
syslog ng maillist     syslog ng@lists.balabit.hu=20
https://lists.balabit.hu/mailman/listinfo/syslog ng=20


_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng

--=_530EB471.AECF133E
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"><FONT=
=20
size=3D1>1.4.15</FONT><BR><BR>&gt;&gt;&gt; Michael.Earls@chmcc.org =
05/06/02=20
08:13AM &gt;&gt;&gt;<BR>what ver of syslog-ng?<BR><BR>&nbsp;&nbsp;&nbsp;=20=

-----Original Message-----<BR>From: nelsotob@ohsu.edu <BR>Sent: Monday, =
May 06,=20
2002 11:14 AM<BR>To: &lt;syslog-ng@lists.balabit.hu&gt;<BR>Subject: Re:=20
[syslog-ng]Syslog-ng and Mysql<BR><BR><BR><BR>&nbsp;&nbsp;&nbsp; Yes that =
is=20
actually what I have in my script is INSERT just a<BR>typo in the =
messages.=20
<BR><BR>&nbsp;&nbsp;&nbsp; Toby <BR><BR><BR>&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;=
=20
sander@sanderscorner.com 05/04/02 04:39AM &gt;&gt;&gt; <BR>(Response to =
message=20
from Toby Nelson, nelsotob@ohsu.edu) <BR><BR>&nbsp;&nbsp;&nbsp; Hello =
Toby,=20
<BR><BR>&nbsp;&nbsp;&nbsp; Should'nt it be 'template("INSERT INTO...'?=20
<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <BR><BR>&nbsp;&nbsp;&nbsp; =
Regards,=20
<BR>Sander <BR><BR>&nbsp;&nbsp;&nbsp; Saturday, May 04, 2002, 1:14:08 AM, =
you=20
wrote: <BR><BR>&nbsp;&nbsp;&nbsp; &gt; Can someone help me? <BR>&gt; I =
have=20
syslog ng running perfectly getting all info from all of my<BR>hosts. I =
would=20
like to take this one step farther and start adding it to<BR>a mysql data =
base.=20
I have made the mysql.pipe using<BR><BR>&nbsp;&nbsp;&nbsp; &gt; mkfifo and =
add=20
the following lines to my syslog ng.conf: <BR><BR>&nbsp;&nbsp;&nbsp; =
&gt;=20
destination d_mysql {=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>pipe("/etc/mysql.pipe" template("INSET INTO logs(host,=20
facility,<BR>priority, level, tag, date, time, program, msg)=20
VALUES('$HOST',<BR>'$FACILILITY', '$PRIORITY', '$LEVEL',=20
'$TAG',<BR><BR>&nbsp;&nbsp;&nbsp; &gt; '$YEAR $MONTH $DAY', $HOUR:$MIN:$SEC=
',=20
'$PROGRAM',<BR>$MSG');\n") template escape(yes)); <BR>&gt; };=20
<BR><BR><BR>&nbsp;&nbsp;&nbsp; ____________________________________________=
___=20
<BR>syslog ng maillist&nbsp;&nbsp;&nbsp;&nbsp; syslog ng@lists.balabit.hu =
<BR><A=20
href=3D"https://lists.balabit.hu/mailman/listinfo/syslog">https://lists.bal=
abit.hu/mailman/listinfo/syslog</A>=20
ng <BR><BR><BR>_______________________________________________<BR>syslog-ng=
=20
maillist&nbsp; -&nbsp; 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></BODY></HTML>

--=_530EB471.AECF133E--