Fixes: https://tracker.ceph.com/issues/71707
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
{% endif %}
maxconn 8000
-{% if spec.enable_stats %}
frontend stats
mode http
{% for monitor_ip in monitor_ips %}
bind {{ monitor_ip }}:{{ monitor_port }}
{% endif %}
{% endfor %}
+{% if spec.enable_stats %}
stats enable
stats uri /stats
stats refresh 10s
stats auth {{ user }}:{{ password }}
http-request use-service prometheus-exporter if { path /metrics }
+{% endif %}
monitor-uri /health
-{% endif %}
frontend frontend
{% if spec.ssl or spec.ssl_cert %}
bind {{ ip }}:{{ frontend_port }} ssl crt /var/lib/haproxy/haproxy.pem {{ v4v6_flag }}
'timeout server 30s\n '
'timeout check 5s\n '
'maxconn 8000\n'
+ '\nfrontend stats\n'
+ ' mode http\n'
+ ' bind 1.2.3.4:8999\n'
+ ' bind 1.2.3.7:8999\n'
+ ' monitor-uri /health\n'
'\nfrontend frontend\n '
'bind 1.2.3.4:8089\n '
'default_backend backend\n\n'