Skip to content

Commit 93edf37

Browse files
committed
Avoid sending haproxy logs to remote syslog servers
1 parent 1076085 commit 93edf37

File tree

1 file changed

+7
-2
lines changed
  • ansible/roles/proxy-haproxy/tasks

1 file changed

+7
-2
lines changed

ansible/roles/proxy-haproxy/tasks/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@
1717
# this will cause a spurious warning about loading the module twice.
1818
module(load="imuxsock"
1919
SysSock.Use="off")
20-
input(type="imuxsock" Socket="/var/lib/haproxy/dev/log")
2120
22-
local2.* /var/log/haproxy.log
21+
# Direct inside-chroot messages at a specific ruleset to prevent
22+
# default handling such as syslog forwarding.
23+
input(type="imuxsock" Socket="/var/lib/haproxy/dev/log" ruleset="haproxy")
24+
25+
ruleset(name="haproxy") {
26+
local2.* /var/log/haproxy.log
27+
}
2328
notify: restart rsyslog
2429
- name: Configure logrotate to remove haproxy logs
2530
copy:

0 commit comments

Comments
 (0)