@@ -40,8 +40,10 @@ bind *:443 ssl crt /etc/haproxy/{{ domain }}.crt
4040stats enable
4141stats uri /stats
4242stats refresh 10s
43- http-request add-header X-Forwarded-Proto https
43+ http-request add-header X-Forwarded-Proto https
44+ http-request add-header X-Forwarded-Port 443
4445redirect scheme https if !{ ssl_fc }
46+ option forwardfor
4547
4648acl grafana hdr_sub(host) -i grafana.{{ domain }}
4749acl prometheus hdr_sub(host) -i prometheus.{{ domain }}
@@ -64,35 +66,19 @@ frontend PROMETHEUS
6466
6567backend GRAFANA
6668balance source
67- {% for address in groups ['grafana' ] %}
68- {% if loop .first %}
69- server grafana_{{ loop.index }} {{ address }}:3000 check
70- {% else %}
71- server grafana_{{ loop.index }} {{ address }}:3000 check backup
72- {% endif %}
73- {% endfor %}
69+ server grafana localhost:3000 check ssl verify required ca-file /etc/haproxy/ssl/grafana.crt
7470
7571backend PROMETHEUS
7672balance source
77- {% for address in groups ['prometheus' ] %}
78- server prometheus_{{ loop.index }} {{ address }}:9090 check
79- {% endfor %}
73+ server prometheus localhost:9090 check ssl verify required ca-file /etc/haproxy/ssl/prometheus.crt
8074
8175backend ALERTMANAGER
82- {% for address in groups ['prometheus' ] %}
83- server alertmanager_{{ loop.index }} {{ address }}:9093 check
84- {% endfor %}
76+ server alertmanager localhost:9093 check ssl verify required ca-file /etc/haproxy/ssl/alertmanager.crt
8577
8678backend CHATOPS
87- {% for address in groups ['chatops' ] %}
88- {% if loop .last %}
89- server chatops_{{ loop.index }} {{ address }}:3000 check backup
90- {% else %}
91- server chatops_{{ loop.index }} {{ address }}:3000 check
92- {% endif %}
93- {% endfor %}
79+ server chatops_0 localhost:3030 check
80+ server chatops_1 localhost:3031 check
81+ server chatops_2 localhost:3032 check backup
9482
9583backend KIBANA
96- {% for address in groups ['elastic' ] %}
97- server elastic_{{ loop.index }} {{ address }}:5601 check
98- {% endfor %}
84+ server kibana localhost:5601 check ssl verify required ca-file /etc/haproxy/ssl/kibana.crt
0 commit comments