[syslog-ng] Centos 6 Syslog-ng

Pigri pappdav at gmail.com
Mon Jan 9 10:53:38 CET 2012


Very big thanks your help :)

Have nice day :).


On 9 January 2012 10:36, Gergely Nagy <algernon at balabit.hu> wrote:

> Pigri <pappdav at gmail.com> writes:
>
> > I have problem for Centos 6.Rebuild syslog-ng package for epel repo,
> > because not have SQL support.
>
> There is SQL support, it's just your config that's not entirely correct.
>
> > Error:
> >
> > The number of columns and values do not match; len_columns='10',
> > len_values='11'
>
> This tells exactly what the problem is: you have 10 columns specified in
> the config (1-10), but 11 values. Add a 11th column, and all will be
> fine.
>
> > destination d_apache_mysql {
> > sql(type(mysql)
> > host("localhost") username("root") password("xxxxx")
> > database("data")
> > table("accesslog")
> > columns("1", "2", "3", "4", "5", "6", "7", "8","9","10")
>
> 10 columns...
>
> >
> 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")
>
> 11 values.
>
> The number of items in the columns() and values() options MUST be the
> same, otherwise syslog-ng can't construct a valid SQL insert statement.
>
> > indexes("1", "2", "3", "4", "5", "6", "7", "8","9","10"));
>
> If you index every column, that will be slow as a snail.
>
> --
> |8]
>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20120109/0700acee/attachment.htm 


More information about the syslog-ng mailing list