From 5d99b281f2667f2adb5974a7d9ea46000c4a0267 Mon Sep 17 00:00:00 2001 From: Xavier Date: Fri, 12 Jun 2015 17:38:53 +0200 Subject: [PATCH 1/3] Updated path for HAProxy logs --- system/rsyslog.d/20-haproxy.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/rsyslog.d/20-haproxy.conf b/system/rsyslog.d/20-haproxy.conf index 7b7501f..3753283 100644 --- a/system/rsyslog.d/20-haproxy.conf +++ b/system/rsyslog.d/20-haproxy.conf @@ -1,2 +1,2 @@ -if $programname == 'haproxy' then /var/log/haproxy.log +if $programname == 'haproxy' then /var/log/haproxy/haproxy.log & ~ From 4d7894d0a569e3150b4dca271b52d4cd08494223 Mon Sep 17 00:00:00 2001 From: Xavier Date: Fri, 12 Jun 2015 17:44:01 +0200 Subject: [PATCH 2/3] Added Logrotate configuration file for HAProxy --- system/logrotate.d/haproxy.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 system/logrotate.d/haproxy.conf diff --git a/system/logrotate.d/haproxy.conf b/system/logrotate.d/haproxy.conf new file mode 100644 index 0000000..8148b82 --- /dev/null +++ b/system/logrotate.d/haproxy.conf @@ -0,0 +1,12 @@ +/var/log/haproxy.log { + daily + rotate 31 + missingok + notifempty + compress + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true + endscript +} From 92d4fc9b6d44834fef83b915eeb32ad2d81e1697 Mon Sep 17 00:00:00 2001 From: Xavier Date: Fri, 3 Jul 2015 15:15:37 +0200 Subject: [PATCH 3/3] Fixed path for HAProxy logrotate config file. Thanks for catching this @lazedo ! --- system/logrotate.d/haproxy.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/logrotate.d/haproxy.conf b/system/logrotate.d/haproxy.conf index 8148b82..9f40020 100644 --- a/system/logrotate.d/haproxy.conf +++ b/system/logrotate.d/haproxy.conf @@ -1,4 +1,4 @@ -/var/log/haproxy.log { +/var/log/haproxy/haproxy.log { daily rotate 31 missingok