r/victoria-metrics-nginx: Add reverse proxy for V-M

The *victoria-metrics-nginx* role configures *nginx* as a reverse proxy
for Victoria Metrics.
btop
Dustin 2022-07-18 18:11:41 -05:00
parent 31fe128d48
commit 956a40f054
4 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1 @@
victoria_metrics_server_name: '{{ ansible_fqdn }}'

View File

@ -0,0 +1,3 @@
dependencies:
- role: nginx
tags: nginx

View File

@ -0,0 +1,9 @@
- name: ensure nginx is configured to proxy for victoria metrics
template:
src: victoria-metrics.nginx.conf.j2
dest: /etc/nginx/conf.d/victoria-metrics.conf
mode: u=rw,go=r
notify:
- reload nginx
tags:
- nginx-config

View File

@ -0,0 +1,10 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ victoria_metrics_server_name }};
location / {
proxy_pass http://[::1]:8428/;
client_max_body_size 100m;
}
}