system-config/playbooks/roles/haproxy/templates/haproxy.cfg.j2
Jeremy Stanley 836cb746c8 Remove the tcplog option from haproxy configs
Adding the tcplog option to an haproxy backend definition overrides
the default log format. Remove it so the supplied default (which we
based on the tcplog built-in default with some additions) will be
used instead.

Change-Id: Id302dede950c1c2ab8e74a662cc3cb1186a6593d
2020-06-30 22:22:28 +00:00

37 lines
814 B
Django/Jinja

global
uid 1000
gid 1000
log /dev/log local0
maxconn 4000
pidfile /var/haproxy/run/haproxy.pid
stats socket /var/haproxy/run/stats uid 1000 gid 1000 mode 0600 level admin
defaults
log-format "%ci:%cp [%t] %ft [%bi]:%bp %b/%s %Tw/%Tc/%Tt %B %ts %ac/%fc/%bc/%sc/%rc %sq/%bq"
log global
maxconn 8000
option redispatch
retries 3
stats enable
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 2m
timeout server 2m
timeout check 10s
{% for listener in haproxy_listeners %}
listen {{ listener.name }}
{% for bind in listener.bind %}
bind {{ bind }}
{% endfor %}
mode tcp
balance source
option tcp-check
{% for server in listener.servers %}
server {{ server.name }} {{ server.address }} check
{% endfor %}
{% endfor %}