r/v-m-nginx: Proxy for other services too

The *metricspi* hosts several Victoria Metrics-adjacent applications.
These each expose their own HTTP interface that can be used for
debugging or introspecting state.  To make these accessible on the
network, the *victoria-metrics-nginx* role now configures `proxy_pass`
directives for them in its nginx configuration.
btop
Dustin 2022-08-12 11:44:40 -05:00
parent 7ac5493b63
commit 887d462127
2 changed files with 15 additions and 0 deletions

View File

@ -1 +1,10 @@
victoria_metrics_server_name: '{{ ansible_fqdn }}'
vm_nginx_proxy_paths:
- path: /alertmanager/
url: http://[::1]:9093/
- path: /vmagent/
url: http://[::1]:8429/
- path: /vmalert
url: http://[::1]:8880
- path: /blackbox_exporter/
url: http://[::1]:9115/

View File

@ -7,4 +7,10 @@ server {
proxy_pass http://[::1]:8428/;
client_max_body_size 100m;
}
{% for item in vm_nginx_proxy_paths %}
location {{ item.path }} {
proxy_pass {{ item.url }};
}
{% endfor %}
}