| @@ -23,10 +23,10 @@ | |||||
| resolver 127.0.0.11 valid=5s; | resolver 127.0.0.11 valid=5s; | ||||
| set $backend "matrix-prometheus-node-exporter:9100"; | set $backend "matrix-prometheus-node-exporter:9100"; | ||||
| proxy_pass http://$backend/metrics; | proxy_pass http://$backend/metrics; | ||||
| {% elif matrix_prometheus_postgres_exporter_container_http_host_bind_port != '' %} | |||||
| proxy_pass http://{{ matrix_prometheus_postgres_exporter_container_http_host_bind_port }}/metrics; | |||||
| {% else %} | {% else %} | ||||
| {# Generic configuration for use outside of our container setup #} | |||||
| {# This may be implemented in the future. #} | |||||
| return 404 "matrix-nginx-proxy is disabled, so metrics are unavailable"; | |||||
| return 404 "matrix-nginx-proxy is disabled and no host port was bound to the container, so metrics are unavailable"; | |||||
| {% endif %} | {% endif %} | ||||
| } | } | ||||
| @@ -23,10 +23,10 @@ | |||||
| resolver 127.0.0.11 valid=5s; | resolver 127.0.0.11 valid=5s; | ||||
| set $backend "matrix-prometheus-postgres-exporter:9187"; | set $backend "matrix-prometheus-postgres-exporter:9187"; | ||||
| proxy_pass http://$backend/metrics; | proxy_pass http://$backend/metrics; | ||||
| {% elif matrix_prometheus_node_exporter_container_http_host_bind_port != '' %} | |||||
| proxy_pass http://{{ matrix_prometheus_node_exporter_container_http_host_bind_port }}/metrics; | |||||
| {% else %} | {% else %} | ||||
| {# Generic configuration for use outside of our container setup #} | |||||
| {# This may be implemented in the future. #} | |||||
| return 404 "matrix-nginx-proxy is disabled, so metrics are unavailable"; | |||||
| return 404 "matrix-nginx-proxy is disabled and no host port was bound to the container, so metrics are unavailable"; | |||||
| {% endif %} | {% endif %} | ||||
| } | } | ||||