forked from infra/ansible
HAProxy/Rsyslog: fix logging to the rsyslog UDP port that haproxy expects
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
parent
9b38df0550
commit
69645f5da5
4 changed files with 11 additions and 3 deletions
|
|
@ -16,8 +16,8 @@ module(load="imjournal" # provides access to the systemd journal
|
|||
|
||||
# Provides UDP syslog reception
|
||||
# for parameters see http://www.rsyslog.com/doc/imudp.html
|
||||
#module(load="imudp") # needs to be done just once
|
||||
#input(type="imudp" port="514")
|
||||
module(load="imudp") # needs to be done just once
|
||||
input(type="imudp" port="514")
|
||||
|
||||
# Provides TCP syslog reception
|
||||
# for parameters see http://www.rsyslog.com/doc/imtcp.html
|
||||
|
|
|
|||
1
roles/haproxy/files/rsyslog.conf
Normal file
1
roles/haproxy/files/rsyslog.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
local0.* /var/log/haproxy.log
|
||||
|
|
@ -109,6 +109,13 @@
|
|||
- haproxy
|
||||
- selinux
|
||||
|
||||
- name: Install our rsyslog drop-in for where to send local0 messages
|
||||
ansible.builtin.copy: src=rsyslog.conf dest=/etc/rsyslog.d/haproxy.conf
|
||||
notify:
|
||||
- Restart rsyslog
|
||||
tags:
|
||||
- haproxy
|
||||
- rsyslogd
|
||||
|
||||
- name: Check haproxy cfg to make sure it is valid
|
||||
ansible.builtin.command: haproxy -c -f /etc/haproxy/haproxy.cfg
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# this config needs haproxy-1.1.28 or haproxy-1.2.1
|
||||
|
||||
global
|
||||
log 127.0.0.1 local0 warning
|
||||
log 127.0.0.1:514 local0 warning
|
||||
maxconn 4096
|
||||
chroot /var/lib/haproxy
|
||||
user haproxy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue