ubuntu 10.04 (should work with other releases also)
Create a file in  /etc/rsyslog.d/20-haproxy.conf whick looks like:
$ModLoad imudp $UDPServerRun 514  local0.* -/var/log/haproxy_0.log local1.* -/var/log/haproxy_1.log in file 50-default.conf edit the line to look like:
*.*;auth,authpriv,local0,local1.none     -/var/log/syslog Restart rsyslog
Setup logrotate
in /etc/logrotate.d/haproxy
/var/log/haproxy.log {     rotate 4     weekly     missingok     notifempty     compress     delaycompress     sharedscripts     postrotate         reload rsyslog >/dev/null 2>&1 || true     endscript }
Happy logging 
No comments:
Post a Comment