Merge "Enable HAProxy Stats Web UI"
This commit is contained in:
commit
fb61e3e176
@ -85,3 +85,6 @@ swift_dispersion_password:
|
||||
### Once the swift cluster has been setup DO NOT change these hash values!
|
||||
swift_hash_path_suffix:
|
||||
swift_hash_path_prefix:
|
||||
|
||||
## haproxy stats password
|
||||
haproxy_stats_password:
|
||||
|
@ -43,6 +43,13 @@ haproxy_rise: 3
|
||||
haproxy_fall: 3
|
||||
haproxy_interval: 12000
|
||||
|
||||
## Haproxy Stats
|
||||
haproxy_stats_enabled: False
|
||||
haproxy_stats_bind_address: 127.0.0.1
|
||||
haproxy_stats_port: 1936
|
||||
haproxy_username: admin
|
||||
haproxy_stats_password: secrete
|
||||
|
||||
# Default haproxy backup nodes to empty list so this doesn't have to be
|
||||
# defined for each service.
|
||||
haproxy_backup_nodes: []
|
||||
|
@ -14,11 +14,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Drop base haproxy config
|
||||
copy:
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/haproxy/{{ item }}"
|
||||
dest: "/etc/haproxy/haproxy.cfg"
|
||||
with_items:
|
||||
- haproxy.cfg
|
||||
- haproxy.cfg.j2
|
||||
notify: Restart haproxy
|
||||
tags:
|
||||
- haproxy-base-config
|
||||
|
@ -1,3 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
global
|
||||
log 127.0.0.1 local0
|
||||
log 127.0.0.1 local1 notice
|
||||
@ -18,3 +20,13 @@ defaults
|
||||
timeout connect 10s
|
||||
timeout server 50s
|
||||
maxconn 4096
|
||||
|
||||
{% if haproxy_stats_enabled | bool %}
|
||||
listen stats {{ haproxy_stats_bind_address }}:{{ haproxy_stats_port }}
|
||||
mode http
|
||||
stats enable
|
||||
stats hide-version
|
||||
stats realm Haproxy\ Statistics
|
||||
stats uri /
|
||||
stats auth {{ haproxy_username }}:{{ haproxy_stats_password }}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user