commit a3f0db21c98184c5c52cf04b7e94570e26e2847d
parent 3ae71b9a2830612dfc2d516523e8dbc56b4f4af1
Author: Devan Carpenter <devan@taler.net>
Date: Mon, 30 Dec 2024 03:34:21 +0000
monitoring: fix nginx reverse proxy config
- locations were only mapped to exact routes
- now they match subroutes too
- use default ports of exporters
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/roles/monitoring/templates/etc/nginx/sites-available/monitoring-nginx.conf.j2 b/roles/monitoring/templates/etc/nginx/sites-available/monitoring-nginx.conf.j2
@@ -21,7 +21,7 @@ server {
error_log /var/log/nginx/monitoring.{{ DOMAIN_NAME }}.err;
access_log /var/log/nginx/monitoring.{{ DOMAIN_NAME }}.log;
- location = /nginx/ {
+ location /nginx/ {
# Put API behind simple access control. TODO: check Prometheus can do this!
if ($http_authorization != "Bearer {{ PROMETHEUS_ACCESS_TOKEN }}") {
return 401;
@@ -29,23 +29,23 @@ server {
proxy_pass http://127.0.0.1:9113/;
}
- location = /node/ {
+ location /node/ {
# Put API behind simple access control. TODO: check Prometheus can do this!
if ($http_authorization != "Bearer {{ PROMETHEUS_ACCESS_TOKEN }}") {
return 401;
}
- proxy_pass http://127.0.0.1:9114/;
+ proxy_pass http://127.0.0.1:9100/;
}
- location = /postgres/ {
+ location /postgres/ {
# Put API behind simple access control. TODO: check Prometheus can do this!
if ($http_authorization != "Bearer {{ PROMETHEUS_ACCESS_TOKEN }}") {
return 401;
}
- proxy_pass http://127.0.0.1:9115/;
+ proxy_pass http://127.0.0.1:9187/;
}
- location = /systemd/ {
+ location /systemd/ {
# Put API behind simple access control. TODO: check Prometheus can do this!
if ($http_authorization != "Bearer {{ PROMETHEUS_ACCESS_TOKEN }}") {
return 401;