-
Notifications
You must be signed in to change notification settings - Fork 50
/
haproxy-stats.cfg.j2
38 lines (38 loc) · 1.31 KB
/
haproxy-stats.cfg.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% if haproxy_stats is defined and haproxy_stats|bool %}
##########################
# STATS #
##########################
listen stats
{% if haproxy_stats_ssl is defined and haproxy_stats_ssl|bool %}
bind {{ haproxy_stats_address }}:{{ haproxy_stats_port }} {{ haproxy_ssl }}
{% else %}
bind {{ haproxy_stats_address }}:{{ haproxy_stats_port }}
{% endif %}
mode http
maxconn 10
{% if haproxy_stats_acls is defined and haproxy_stats_acls|length %}
{% for acl in haproxy_stats_acls %}
acl {{ acl }}
{% endfor %}
{% endif %}
stats enable
{% for opt in haproxy_stats_options %}
stats {{ opt }}
{% endfor %}
stats uri {{ haproxy_stats_uri }}
{% if haproxy_stats_auth is defined and haproxy_stats_auth|bool %}
stats realm Haproxy\ Statistics
stats auth {{ haproxy_stats_user }}:{{ haproxy_stats_password }}
{% endif %}
{% for listener_opt in haproxy_stats_listener_options %}
option {{ listener_opt }}
{% endfor %}
{% for http_request in haproxy_stats_http_requests %}
http-request {{ http_request }}
{% endfor %}
{% if haproxy_stats_timeouts is defined and haproxy_stats_timeouts|length %}
{% for timeout in haproxy_stats_timeouts %}
timeout {{ timeout }}
{% endfor %}
{% endif %}
{% endif %}