<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I am using the version 3.04 of syslog-ng, as reported:<br><br><font style="" face="Courier New">$./syslog-ng -V</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">syslog-ng 3.0.4</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Revision:
ssh+git://bazsi@git.balabit//var/scm/git/syslog-ng/syslog-ng-ose--mainline--3.0#master#1b5d618e301ad94aa20e692ffba16469dece8d10</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Compile-Date: Aug&nbsp; 5 2009 17:38:20</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Threads: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Debug: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-GProf: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Memtrace: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Sun-STREAMS: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Sun-Door: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-IPv6: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Spoof-Source: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-TCP-Wrapper: off</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-SSL: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-SQL: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Linux-Caps: on</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Enable-Pcre: off</font><font style="" face="Courier New"><br></font><br>I would like to use the <b>sql()</b> features;<br><br>but syslog-ng does not write anything on dbase, and the<font style="font-size: 16pt;" size="4"><b> cpu go to 100</b></font><font style="font-size: 16pt;" size="4">%</font>;<br><br>this is the configuration of the destination sql<br><br><font style="" face="Courier New">destination d_mysql {</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sql(type(mysql)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host("localhost") username("syslogadmin") password("syslogadmin")</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; database("syslog")</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table("logs")</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; columns("host", "facility", "priority", "level", "tag", "datetime", "program", "msg", "seq")</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$LEVEL", "$TAG",
"$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "$MSG", "$SEQNUM")</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indexes("host", "facility", "priority", "datetime", "program", "seq"));</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">};</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><br><font style="" face="Verdana">of course, the configuration like this</font><br>destination d_mysql {<br>&nbsp;&nbsp;&nbsp; program("/usr/bin/mysql -usyslogadmin -psyslogadmin syslog"<br>&nbsp;&nbsp;&nbsp; template("INSERT INTO logs (host, facility, priority, level, tag, datetime, program, msg)<br>&nbsp;&nbsp;&nbsp; VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n")<br>&nbsp;&nbsp;&nbsp; template-escape(yes));<br>};<br>run OK, </font>but I would like to use the sql() statement instead;<br><br>what can I do?<br><br>Is the sql() command supported by the <font style="" face="Courier New">syslog-ng 3.0.4</font><font style="" face="Courier New">?</font><br><br>Thank you.<br><br>                                               <br /><hr />Una risposta istantanea? <a href='http://www.messenger.it/accediWebMessengerHotmail.aspx' target='_new'>Usa Messenger da Hotmail</a></body>
</html>