<div dir="ltr">hi <br>i did it <br><br>same prob<br><br><div class="gmail_quote">2009/4/6 Hahusseau, Thomas <span dir="ltr"><<a href="mailto:thomas.hahusseau@eads.com">thomas.hahusseau@eads.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="blue" lang="FR">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Add a « & »
at the end of the line with « mysql » to run the mysql client as a
background task.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="2" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">De :</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a> [mailto:<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a>] <b><span style="font-weight: bold;">De la part de</span></b> gatfi sami<br>
<b><span style="font-weight: bold;">Envoyé :</span></b> dimanche 5 avril
2009 02:31<br>
<b><span style="font-weight: bold;">À :</span></b> Syslog-ng
users' and developers' mailing list<br>
<b><span style="font-weight: bold;">Objet :</span></b> [syslog-ng] problem
in writing to database 2</span></font></p>
</div><div><div></div><div class="h5">
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">i succefully added the folowing script to <br>
<br>
/etc/profile<br>
<br>
it recreates the pilpline but <br>
<br>
when i get access to the virtual machine by ssh it is blocked<br>
like this:<br>
Password: <br>
<br>
<b><span style="font-weight: bold;">Last login: Sun Apr 5 03:08:51 2009 from
linux-ux35.lan <br>
Have a lot of fun...<br>
<br>
</span></b>i have to tape ctrl + c to <br>
have<br>
linux-test1:~ # <br>
<br>
<br>
<br>
i have to tape ctrl +c to get access to it <br>
<br>
<br>
here is the script<br>
<br>
</span></font></p>
<div style="border: 1pt inset ; padding: 5pt;"><pre style="border: medium none ; padding: 0cm;"><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></pre><pre style="border: medium none ; padding: 0cm;">
<font face="Courier New" size="2"><span style="font-size: 10pt;">#!/bin/bash<br>
if [ -e /tmp/mysql.pipe ]; then<br>
while [ -e /tmp/mysql.pipe ]<br>
do<br>
mysql -u root --password= syslog< /tmp/mysql.pipe<br>
done<br>
else<br>
mkfifo /tmp/mysql.pipe<br>
fi</span></font></pre></div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
i think the problem is from <br>
<br>
mysql -u root --password= syslog< /tmp/mysql.pipe<br>
<br>
<br>
</span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2009/4/4 gatfi sami <<a href="mailto:pfegatfi.sami@gmail.com" target="_blank">pfegatfi.sami@gmail.com</a>></span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">hi<br>
<br>
i am configuring a centralised syslog server and when i arrived to the writing
into the database there is some thing wrong <br>
<br>
because when i use a file as destination i see incoming logs when i restart
apache2 or mysql in the client<br>
<br>
"tail - f /"<br>
i use syslog -ng 2.0<br>
<br>
here is the client<br>
<b><span style="font-weight: bold;">source my_src{<br>
file("/var/log/apache2/error_log" follow_freq(1) );<br>
<br>
file("/var/lib/mysql/mysqld.log" follow_freq(1) );<br>
<br>
};<br>
<br>
<br>
destination loghost {<br>
tcp("192.168.1.69" port(514));<br>
};<br>
log {<br>
source(my_src);<br>
destination(loghost);<br>
};</span></b><br>
<br>
<br>
<br>
here is the server<br>
<br>
<b><span style="font-weight: bold;"> source mysrc{ tcp(ip(0.0.0.0) port(514)
keep-alive(yes));<br>
#udp();<br>
};<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', '$PRIORITY',
'$LEVEL',<br>
'$TAG',<br>
'$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n")<br>
template-escape(yes));<br>
};<br>
log { source(mysrc); destination(d_mysql);<br>
};<br>
</span></b><br>
<br>
note that a databes names syslog is already created and contain a table logs;<br>
<br>
<br>
<br>
if itry the following command : syslog-ng -f /etc/syslog-ng/syslog-ng.conf<br>
<br>
Error binding socket; addr='AF_INET(0.0.0.0:514)', error='Address already in
use (98)'<br>
Error initializing source driver; source='mysrc'<br>
<br>
<br>
ps i used to use the server as relai and send by udp using the same port 514
but now everinthing is <br>
<br>
commented like this #<br>
<br>
need help</span></font></p>
</div>
</div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
i added the following script to the file </span></font></p>
</div>
</div></div></div>
</div>
<br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
<br></blockquote></div><br></div>