syslog-ng setting for haproxy tcplog.
template t_haproxy_acc {
template("$MSG\n");
template_escape(no);
};
template t_haproxy_sys {
template("$DATE $HOST $PRIORITY $MSGHDR$MSG\n");
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); };
Written by sawanoboly
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Haproxy
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#