[syslog-ng]syslog-ng

Michael Earls Michael.Earls@chmcc.org
Mon, 14 Jan 2002 16:49:46 -0500


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.

--=_7B26093C.345546E9
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi -- i am new here,  and was not sure if this has been posted=20

i am trying to use syslog-ng to log to a mysql datase,   i was told that i =
could pipe or use program, but i do not know how to,

my syslog-ng file is very basic, i am adding lines to create sep files =
like this for each router, is there a way to just pipe this to a mysql =
database.

###
### 7206-core
###
destination 192.168.1.245 {
file("/var/log/routers/7206-core.log"); };
filter f_192.168.1.245 { host(192.168.1.245); };
log { source(net); filter(f_192.168.1.245); destination(192.168.1.245); };


## main router=20
destination 192.168.1.1 {
file("/var/log/routers/main-rr.log"); };
filter f_192.168.1.1 { host(192.168.1.1); };            =20
log { source(net); filter(f_192.168.1.1); destination(192.168.1.1); };


## switch 192.168.1.254
destination 192.168.1.254 {
file("/var/log/routers/michaeleaarls-switch.log"); };
filter f_192.168.1.254 { host(192.168.1.254); };            =20
log { source(net); filter(f_192.168.1.254); destination(192.168.1.254); };


###
### this should work...
###



## tony kings router
destination 192.168.3.1 {
file("/var/log/routers/tking-main.log"); };
filter f_192.168.3.1 { host(192.168.3.1); };
log { source(net); filter(f_192.168.3.1); destination(192.168.3.1); };


## tking switch 192.168.3.254
destination 192.168.3.254 {
file("/var/log/routers/tking-switch.log"); };
filter f_192.168.3.254 { host(192.168.3.254); };
log { source(net); filter(f_192.168.3.254); destination(192.168.3.254); };

--=_7B26093C.345546E9
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 content=3D"text/html; charset=3Diso-8859-1" http-equiv=3DContent-Type=
>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR></HEAD>
<BODY style=3D"FONT: 8pt Tahoma; MARGIN-LEFT: 2px; MARGIN-TOP: 2px">
<DIV><FONT size=3D3>Hi -- i am new here,&nbsp; and was not sure if this =
has been=20
posted </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D3>i am trying to use syslog-ng to log to a mysql=20
datase,&nbsp;&nbsp; i was told that i could pipe or use program, but i do =
not=20
know how to,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D3>my syslog-ng file is very basic, i am adding&nbsp;lines=
 to=20
create sep files like this for each router, is there a way to just pipe =
this to=20
a mysql database.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D3>###<BR>### 7206-core<BR>###<BR>destination 192.168.1.24=
5=20
{<BR>file("/var/log/routers/7206-core.log"); };<BR>filter f_192.168.1.245 =
{=20
host(192.168.1.245); };<BR>log { source(net); filter(f_192.168.1.245);=20
destination(192.168.1.245); };</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><FONT size=3D3>## main router <BR>destination 192.168.1.1=20
{<BR>file("/var/log/routers/main-rr.log"); };<BR>filter f_192.168.1.1 {=20
host(192.168.1.1);=20
};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
<BR>log { source(net); filter(f_192.168.1.1); destination(192.168.1.1);=20
};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><FONT size=3D3>## switch 192.168.1.254<BR>destination 192.168.1.25=
4=20
{<BR>file("/var/log/routers/michaeleaarls-switch.log"); };<BR>filter=20
f_192.168.1.254 { host(192.168.1.254);=20
};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
<BR>log { source(net); filter(f_192.168.1.254); destination(192.168.1.254);=
=20
};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><FONT size=3D3>###<BR>### this should work...<BR>###</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D3>## tony kings router<BR>destination 192.168.3.1=20
{<BR>file("/var/log/routers/tking-main.log"); };<BR>filter f_192.168.3.1 =
{=20
host(192.168.3.1); };<BR>log { source(net); filter(f_192.168.3.1);=20
destination(192.168.3.1); };</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><FONT size=3D3>## tking switch 192.168.3.254<BR>destination =
192.168.3.254=20
{<BR>file("/var/log/routers/tking-switch.log"); };<BR>filter f_192.168.3.25=
4 {=20
host(192.168.3.254); };<BR>log { source(net); filter(f_192.168.3.254);=20
destination(192.168.3.254); };</FONT></DIV></BODY></HTML>

--=_7B26093C.345546E9--