[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>&nbsp;</DIV>
<DIV>michael</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>PGP Info: KeyID 0x5EB59708 Fingerprint 108B A1D8 76F5 08A8 501A F28C 86F4 
4BC5 5EB5 9708 <BR><BR>&gt;&gt;&gt; james.fleet@upbna.com 01/13/03 01:57PM 
&gt;&gt;&gt;<BR>&gt; Hello,<BR>&gt; <BR>&gt; I have been trying to create a 
syslog server with MySQL and with several<BR>&gt; attempts it does not work. I 
have attached my configs for the system which<BR>&gt; runs on Linux RH 7.3. 
<BR>&gt; <BR>&gt; <BR>&gt; This is my syslog-ng.conf file :<BR>&gt; <BR>&gt; 
#<BR>&gt; # Syslog-ng example configuration file showing all the existing/future 
<BR>&gt; # features.<BR>&gt; #<BR>&gt; # Copyright (c) 1999 Balazs 
Scheidler<BR>&gt; # $Id: syslog-ng.conf.demo,v 1.2 1999/11/15 12:30:41 bazsi Exp 
$<BR>&gt; #<BR>&gt; # Note that some of the keywords do _nothing_, this 
includes:<BR>&gt; #&nbsp; mac, authentication, encryption, compress<BR>&gt; 
#<BR>&gt; <BR>&gt; #options { sync(0); time_reopen(10); log_fifo_size(100); 
};<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
## Log syslog-ng to mysql 
database<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
##<BR>&gt;&nbsp; destination d_mysql {<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
pipe("/tmp/mysql.pipe"<BR>&gt; template ("INSERT INTO logs (host, facility, 
priority, level, tag, date,<BR>&gt; time, program, msg) VALUES ( '$HOST', 
'$FACILITY',<BR>&gt;<BR>'$PRIORITY','$LEVEL','$TAG','$YEAR-$MONTH-$DAY','$HOUR:$MIN:$SEC','$PROGRAM'<BR>&gt; 
,'$MSG' );\n") 
template-escape(yes));<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&gt;&nbsp;&nbsp;&nbsp; log { source(net); destination(d_mysql);<BR>&gt; 
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&gt; #source src { <BR>&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
unix-stream("/dev/log");<BR>&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
udp();<BR>&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp(ip("127.0.0.1") 
port(1000) mac(allow) authentication(required)<BR>&gt; encrypt(allow));<BR>&gt; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp();<BR>&gt; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sun-streams("/dev/log" 
door("/etc/.syslog_door"));<BR>&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
internal();<BR>&gt; #};<BR>&gt; source src { unix-dgram("/etc/log/log"); 
internal(); };<BR>&gt; source net { udp(); };<BR>&gt; <BR>&gt; #log { 
source(src); destination(everything); };<BR>&gt;&nbsp; <BR>&gt; <BR>&gt; I also 
have this script running which says that /tmp/msql.pipe is my fifo<BR>&gt; 
directory.<BR>&gt; <BR>&gt; But I am still not receiving logs into the database 
but when I switch it<BR>&gt; will log to messages.<BR>&gt; <BR>&gt; <BR>&gt; 
-James Fleet -<BR>&gt; <BR>&gt; Systems Engineer <BR>&gt; Union Planters 
Bank<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; 
<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR><BR>-- <BR>Bazsi<BR>PGP info: 
KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 
8EB1<BR><BR>_______________________________________________<BR>syslog-ng 
maillist&nbsp; -&nbsp; 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--