Add matrix_synapse_usage_exporter_hostname and matrix_synapse_usage_exporter_path_prefix

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3442
This commit is contained in:
Slavi Pantaleev 2024-07-25 20:24:04 +03:00
parent 55f869254b
commit 4d9de7d58a
2 changed files with 13 additions and 4 deletions

View File

@ -8,7 +8,7 @@ Enabling this service will automatically:
- install the synapse-usage-exporter service
- re-configure Synapse to push (via HTTP `PUT`) usage statistics information to synapse-usage-exporter
- re-configure [Prometheus](./configuring-playbook-prometheus-grafana.md) (if Grafana is enabled), to periodically scrape metrics from synapse-usage-exporter
- re-configure [Prometheus](./configuring-playbook-prometheus-grafana.md) (if Prometheus is enabled), to periodically scrape metrics from synapse-usage-exporter
- add a new [Grafana](./configuring-playbook-prometheus-grafana.md) dashboard (if Grafana is enabled) containing Synapse usage statistics
## Quickstart
@ -21,5 +21,6 @@ matrix_synapse_usage_exporter_enabled: true
# (Optional) Expose endpoint if you want to collect statistics from outside (from other homeservers).
# If enabled, synapse-usage-exporter will be exposed publicly at `matrix.DOMAIN/report-usage-stats/push`.
# When collecting usage statistics for Synapse running on the same host, you don't need to enable this.
# You can adjust the hostname and path via `matrix_synapse_usage_exporter_hostname` and `matrix_synapse_usage_exporter_path_prefix`.
# matrix_synapse_usage_exporter_proxying_enabled: true
```

View File

@ -5,6 +5,11 @@
matrix_synapse_usage_exporter_enabled: false
# Controls the hostname and path that this component exposes its web services on.
# Only used if `matrix_synapse_usage_exporter_proxying_enabled` is true.
matrix_synapse_usage_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
matrix_synapse_usage_exporter_path_prefix: /report-usage-stats/push
# matrix_synapse_usage_exporter_identifier controls the identifier of this synapse-usage-exporter instance, which influences:
# - the default storage path
# - the names of systemd services and containers
@ -44,7 +49,10 @@ matrix_synapse_usage_exporter_container_additional_networks: []
# Extra arguments for the Docker container
matrix_synapse_usage_exporter_container_extra_arguments: []
# Controls whether the synapse usage exporter should be proxied (exposed) on `matrix.DOMAIN/report-usage-stats/push`
# Controls whether the synapse-usage-exporter's web services should be proxied (exposed publicly).
#
# Exposure happens on `matrix.DOMAIN/report-usage-stats/push` by default.
# See: `matrix_synapse_usage_exporter_hostname` and `matrix_synapse_usage_exporter_path_prefix`.
matrix_synapse_usage_exporter_proxying_enabled: false
# matrix_synapse_usage_exporter_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
@ -54,8 +62,8 @@ matrix_synapse_usage_exporter_proxying_enabled: false
matrix_synapse_usage_exporter_container_labels_traefik_enabled: "{{ matrix_synapse_usage_exporter_proxying_enabled }}"
matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_synapse_usage_exporter_container_network }}"
matrix_synapse_usage_exporter_container_labels_traefik_path_prefix: "/report-usage-stats/push"
matrix_synapse_usage_exporter_container_labels_traefik_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_synapse_usage_exporter_container_labels_traefik_path_prefix | quote }}`)"
matrix_synapse_usage_exporter_container_labels_traefik_path_prefix: "{{ matrix_synapse_usage_exporter_path_prefix }}"
matrix_synapse_usage_exporter_container_labels_traefik_rule: "Host(`{{ matrix_synapse_usage_exporter_hostname }}`) && PathPrefix(`{{ matrix_synapse_usage_exporter_container_labels_traefik_path_prefix }}`)"
matrix_synapse_usage_exporter_container_labels_traefik_priority: 0
matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "web-secure"
matrix_synapse_usage_exporter_container_labels_traefik_tls: "{{ matrix_synapse_usage_exporter_container_labels_traefik_entrypoints != 'web' }}"