[syslog-ng]syslog-ng and MySQL
Michael Earls
Michael.Earls@cchmc.org
Tue, 14 Jan 2003 16:15:55 -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.
--=_0C531B00.63026553
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
What is the source of the syslog messages? Are you trying to log
messages though UDP or local messages?
michael
PGP Info: KeyID 0x5EB59708 Fingerprint 108B A1D8 76F5 08A8 501A F28C
86F4 4BC5 5EB5 9708
>>> james.fleet@upbna.com 01/13/03 01:57PM >>>
> 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
_______________________________________________
syslog-ng maillist - syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
--=_0C531B00.63026553
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 12pt Arial; MARGIN-LEFT: 2px">
<DIV>What is the source of the syslog messages? Are you trying to log messages
though UDP or local messages?</DIV>
<DIV> </DIV>
<DIV>michael</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>PGP Info: KeyID 0x5EB59708 Fingerprint 108B A1D8 76F5 08A8 501A F28C 86F4
4BC5 5EB5 9708 <BR><BR>>>> james.fleet@upbna.com 01/13/03 01:57PM
>>><BR>> Hello,<BR>> <BR>> I have been trying to create a
syslog server with MySQL and with several<BR>> attempts it does not work. I
have attached my configs for the system which<BR>> runs on Linux RH 7.3.
<BR>> <BR>> <BR>> This is my syslog-ng.conf file :<BR>> <BR>>
#<BR>> # Syslog-ng example configuration file showing all the existing/future
<BR>> # features.<BR>> #<BR>> # Copyright (c) 1999 Balazs
Scheidler<BR>> # $Id: syslog-ng.conf.demo,v 1.2 1999/11/15 12:30:41 bazsi Exp
$<BR>> #<BR>> # Note that some of the keywords do _nothing_, this
includes:<BR>> # mac, authentication, encryption, compress<BR>>
#<BR>> <BR>> #options { sync(0); time_reopen(10); log_fifo_size(100);
};<BR>>
## Log syslog-ng to mysql
database<BR>>
##<BR>> destination d_mysql {<BR>>
pipe("/tmp/mysql.pipe"<BR>> template ("INSERT INTO logs (host, facility,
priority, level, tag, date,<BR>> time, program, msg) VALUES ( '$HOST',
'$FACILITY',<BR>><BR>'$PRIORITY','$LEVEL','$TAG','$YEAR-$MONTH-$DAY','$HOUR:$MIN:$SEC','$PROGRAM'<BR>>
,'$MSG' );\n")
template-escape(yes));<BR>>
};<BR>> log { source(net); destination(d_mysql);<BR>>
<BR>>
};<BR>> #source src { <BR>> #
unix-stream("/dev/log");<BR>> #
udp();<BR>> # tcp(ip("127.0.0.1")
port(1000) mac(allow) authentication(required)<BR>> encrypt(allow));<BR>>
# tcp();<BR>>
# sun-streams("/dev/log"
door("/etc/.syslog_door"));<BR>> #
internal();<BR>> #};<BR>> source src { unix-dgram("/etc/log/log");
internal(); };<BR>> source net { udp(); };<BR>> <BR>> #log {
source(src); destination(everything); };<BR>> <BR>> <BR>> I also
have this script running which says that /tmp/msql.pipe is my fifo<BR>>
directory.<BR>> <BR>> But I am still not receiving logs into the database
but when I switch it<BR>> will log to messages.<BR>> <BR>> <BR>>
-James Fleet -<BR>> <BR>> Systems Engineer <BR>> Union Planters
Bank<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> <BR>> <BR>>
<BR>> <BR>> <BR>> <BR>> <BR>> <BR><BR>-- <BR>Bazsi<BR>PGP info:
KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C
8EB1<BR><BR>_______________________________________________<BR>syslog-ng
maillist - syslog-ng@lists.balabit.hu<BR><A
href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</A><BR>Frequently
asked questions at <A
href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</A><BR><BR></DIV></BODY></HTML>
--=_0C531B00.63026553--