Bridges based on bridgev2 no longer expose a metrics endpoint, so the playbook was publishing a Traefik route which could only ever yield an HTTP 502. Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5487pull/5494/head
| @@ -2543,9 +2543,6 @@ matrix_bridge_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matr | |||
| matrix_bridge_mautrix_whatsapp_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}" | |||
| matrix_bridge_mautrix_whatsapp_systemd_required_services_list_auto: | | |||
| {{ | |||
| matrix_addons_homeserver_systemd_services_list | |||
| @@ -2570,12 +2567,6 @@ matrix_bridge_mautrix_whatsapp_double_puppet_secrets_auto: |- | |||
| else {} | |||
| }} | |||
| matrix_bridge_mautrix_whatsapp_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}" | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_enabled: "{{ matrix_bridge_mautrix_whatsapp_metrics_enabled and matrix_metrics_exposure_enabled }}" | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}" | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-whatsapp" | |||
| matrix_bridge_mautrix_whatsapp_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" | |||
| matrix_bridge_mautrix_whatsapp_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}" | |||
| matrix_bridge_mautrix_whatsapp_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}" | |||
| @@ -77,17 +77,6 @@ matrix_bridge_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matr | |||
| matrix_bridge_mautrix_whatsapp_container_labels_traefik_entrypoints: web-secure | |||
| matrix_bridge_mautrix_whatsapp_container_labels_traefik_tls_certResolver: default # noqa var-naming | |||
| # Controls whether labels will be added that expose mautrix-whatsapp's metrics | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_enabled: "{{ matrix_bridge_mautrix_whatsapp_metrics_enabled and matrix_bridge_mautrix_whatsapp_metrics_proxying_enabled }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_rule: "Host(`{{ matrix_bridge_mautrix_whatsapp_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_bridge_mautrix_whatsapp_metrics_proxying_path_prefix }}`)" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_priority: 0 | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints: "{{ matrix_bridge_mautrix_whatsapp_container_labels_traefik_entrypoints }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls: "{{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints != 'web' }}" | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_bridge_mautrix_whatsapp_container_labels_traefik_tls_certResolver }}" # noqa var-naming | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: false | |||
| # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users | |||
| matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: '' | |||
| # Controls whether labels will be added that expose mautrix-whatsapp's HTTP API | |||
| # (used by tools like mautrix-manager for bridge login) at `https://<hostname><path_prefix>`. | |||
| matrix_bridge_mautrix_whatsapp_container_labels_exposure_enabled: "{{ matrix_bridge_mautrix_whatsapp_exposure_enabled }}" | |||
| @@ -131,16 +120,6 @@ matrix_bridge_mautrix_whatsapp_logging_level: 'warn' | |||
| # If false, created portal rooms will never be federated. | |||
| matrix_bridge_mautrix_whatsapp_federate_rooms: true | |||
| # Whether or not metrics endpoint should be enabled. | |||
| # Enabling them is usually enough for a local (in-container) Prometheus to consume them. | |||
| # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_bridge_mautrix_whatsapp_metrics_proxying_enabled`. | |||
| matrix_bridge_mautrix_whatsapp_metrics_enabled: false | |||
| # Controls whether metrics should be proxied (exposed) on a public URL | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_enabled: false | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_hostname: '' | |||
| matrix_bridge_mautrix_whatsapp_metrics_proxying_path_prefix: '' | |||
| # Controls whether mautrix-whatsapp's HTTP API is exposed publicly (used by tools like mautrix-manager for bridge login). | |||
| matrix_bridge_mautrix_whatsapp_exposure_enabled: false | |||
| matrix_bridge_mautrix_whatsapp_exposure_hostname: '' | |||
| @@ -29,6 +29,18 @@ | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bridge_mautrix_whatsapp_container_image_registry_prefix_upstream_default'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_docker_src_files_path', 'new': 'matrix_bridge_mautrix_whatsapp_container_src_files_path'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_metrics_enabled', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_metrics_proxying_enabled', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_metrics_proxying_hostname', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_metrics_proxying_path_prefix', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_enabled', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_rule', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_priority', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls_certResolver', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - {'old': 'matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users', 'new': '<removed> (mautrix-whatsapp does not support metrics)'} | |||
| - name: Fail if required mautrix-whatsapp settings not defined | |||
| ansible.builtin.fail: | |||
| @@ -11,41 +11,6 @@ traefik.enable=true | |||
| traefik.docker.network={{ matrix_bridge_mautrix_whatsapp_container_labels_traefik_docker_network }} | |||
| {% endif %} | |||
| traefik.http.services.matrix-mautrix-whatsapp-metrics.loadbalancer.server.port=8001 | |||
| {% if matrix_bridge_mautrix_whatsapp_container_labels_metrics_enabled %} | |||
| ############################################################ | |||
| # # | |||
| # Metrics # | |||
| # # | |||
| ############################################################ | |||
| {% if matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled %} | |||
| traefik.http.middlewares.matrix-mautrix-whatsapp-metrics-basic-auth.basicauth.users={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users }} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.middlewares=matrix-mautrix-whatsapp-metrics-basic-auth | |||
| {% endif %} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.rule={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_rule }} | |||
| {% if matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_priority | int > 0 %} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.priority={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_priority }} | |||
| {% endif %} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.service=matrix-mautrix-whatsapp-metrics | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.entrypoints={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints }} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.tls={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls | to_json }} | |||
| {% if matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls %} | |||
| traefik.http.routers.matrix-mautrix-whatsapp-metrics.tls.certResolver={{ matrix_bridge_mautrix_whatsapp_container_labels_metrics_traefik_tls_certResolver }} | |||
| {% endif %} | |||
| ############################################################ | |||
| # # | |||
| # /Metrics # | |||
| # # | |||
| ############################################################ | |||
| {% endif %} | |||
| {% if matrix_bridge_mautrix_whatsapp_container_labels_exposure_enabled %} | |||
| ############################################################ | |||
| # # | |||