Skip to content
Snippets Groups Projects
Commit 85ad7bbb authored by jurgenhaas's avatar jurgenhaas
Browse files

Add support for prometheus

parent c46b0788
No related branches found
No related tags found
No related merge requests found
......@@ -163,6 +163,10 @@ frontend http_in
acl kibana_present hdr(host) -i -n '{{ kibana_domain|default(inventory_hostname) }}'
use_backend backend_redirect_ssl if kibana_present
{% endif %}
{% for prometheus in prometheus_settings|default([]) %}
acl prometheus_{{ prometheus.id }}_present hdr(host) -i -n '{{ prometheus.domain|default(inventory_hostname) }}'
use_backend backend_redirect_ssl if prometheus_{{ prometheus.id }}_present
{% endfor %}
{% if 'webserver' in groups %}
{% for host in groups['webserver']|sort %}
http-request set-header x-routing-host {{ host }} if !letsencrypt_challenge { hdr(x-routing-host) undefined } { hdr(host) -i -n -f /etc/haproxy/{{host}}.list }
......@@ -318,6 +322,10 @@ frontend https_in_{{ cert.ip }}
acl kibana_present hdr(host) -i -n '{{ kibana_domain|default(inventory_hostname) }}'
use_backend backend_kibana if kibana_present
{% endif %}
{% for prometheus in prometheus_settings|default([]) %}
acl prometheus_{{ prometheus.id }}_present hdr(host) -i -n '{{ prometheus.domain|default(inventory_hostname) }}'
use_backend backend_prometheus_{{ prometheus.id }} if prometheus_{{ prometheus.id }}_present
{% endfor %}
{% for external in cert.external|default([]) %}
acl is_{{ external.key }} {{ external.acl }}
use_backend backend_{{ external.key }} if is_{{ external.key }}
......@@ -527,6 +535,14 @@ backend backend_kibana
{% endif %}
server kibana 127.0.0.1:5601 check maxconn 32
{% endif %}
{% for prometheus in prometheus_settings|default([]) %}
backend backend_prometheus_{{ prometheus.id }}
{% if proxy_debug %}
http-response set-header X-Proxy-Backend "prometheus_{{ prometheus.id }}"
{% endif %}
server prometheus_{{ prometheus.id }} 127.0.0.1:{{ prometheus.port }} check maxconn 32
{% endfor %}
backend backend_maintenance
{% if proxy_debug %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment