<div><font color="#222222" face="arial, sans-serif">Very big thanks your help :)</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Have nice day :).<br>
</font><br>
<br><div class="gmail_quote">On 9 January 2012 10:36, Gergely Nagy <span dir="ltr"><<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Pigri <<a href="mailto:pappdav@gmail.com">pappdav@gmail.com</a>> writes:<br>
<br>
> I have problem for Centos 6.Rebuild syslog-ng package for epel repo,<br>
> because not have SQL support.<br>
<br>
</div>There is SQL support, it's just your config that's not entirely correct.<br>
<div class="im"><br>
> Error:<br>
><br>
> The number of columns and values do not match; len_columns='10',<br>
> len_values='11'<br>
<br>
</div>This tells exactly what the problem is: you have 10 columns specified in<br>
the config (1-10), but 11 values. Add a 11th column, and all will be<br>
fine.<br>
<div class="im"><br>
> destination d_apache_mysql {<br>
> sql(type(mysql)<br>
> host("localhost") username("root") password("xxxxx")<br>
> database("data")<br>
> table("accesslog")<br>
> columns("1", "2", "3", "4", "5", "6", "7", "8","9","10")<br>
<br>
</div>10 columns...<br>
<div class="im"><br>
> values("$APACHE.CLIENT_IP","$APACHE.IDENT_NAME","$APACHE.USER_NAME","$APACHE.TIMESTAMP","$APACHE.REQUEST_URL","$APACHE.REQUEST_STATUS","$APACHE.CONTENT_LENGTH","$APACHE.REFERER","$APACHE.USER_AGENT","$APACHE.VIRTUAL_HOST","$APACHE.SERVER_NAME")<br>
<br>
</div>11 values.<br>
<br>
The number of items in the columns() and values() options MUST be the<br>
same, otherwise syslog-ng can't construct a valid SQL insert statement.<br>
<div class="im"><br>
> indexes("1", "2", "3", "4", "5", "6", "7", "8","9","10"));<br>
<br>
</div>If you index every column, that will be slow as a snail.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
|8]<br>
<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.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</font></span></blockquote></div><br></div>