소스 검색

if variable to bind an exporter container to a host port is set, have matrix-domain.conf (nginx) support this

pull/1984/head
Luca Bilke 3 년 전
부모
커밋
ea4ee93b13
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. +3
    -3
      roles/matrix-prometheus-node-exporter/tasks/init.yml
  2. +3
    -3
      roles/matrix-prometheus-postgres-exporter/tasks/init.yml

+ 3
- 3
roles/matrix-prometheus-node-exporter/tasks/init.yml 파일 보기

@@ -23,10 +23,10 @@
resolver 127.0.0.11 valid=5s;
set $backend "matrix-prometheus-node-exporter:9100";
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 %}
{# 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 %}
}



+ 3
- 3
roles/matrix-prometheus-postgres-exporter/tasks/init.yml 파일 보기

@@ -23,10 +23,10 @@
resolver 127.0.0.11 valid=5s;
set $backend "matrix-prometheus-postgres-exporter:9187";
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 %}
{# 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 %}
}



불러오는 중...
취소
저장