configuração syslog-ng para haproxy tcplog.

template t_haproxy_acc {
template("$MSGn");
template_escape
(no);
};

template t_haproxy_sys {
template("$DATE $HOST $PRIORITY $MSGHDR$MSGn");
template_escape
(no);
};


destination t_haproxy_acc
{
file
(
"/var/log/haproxy/haproxy_access.log",
template(t_haproxy_acc));
};

destination t_haproxy_sys
{
file
(
"/var/log/haproxy/haproxy_system.log",
template(t_haproxy_sys));
};


filter f_haproxy_acc
{
program
(haproxy) and level(info);
};

filter f_haproxy_sys
{
program
(haproxy) and not level(info);
};


log
{ source(s_src); filter(f_haproxy_acc); destination(t_haproxy_acc); };
log
{ source(s_src); filter(f_haproxy_sys); destination(t_haproxy_sys); };