Просмотр исходного кода

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
pull/3447/head
Slavi Pantaleev 1 год назад
Родитель
Сommit
4d9de7d58a
2 измененных файлов: 13 добавлений и 4 удалений
  1. +2
    -1
      docs/configuring-playbook-synapse-usage-exporter.md
  2. +11
    -3
      roles/custom/matrix-synapse-usage-exporter/defaults/main.yml

+ 2
- 1
docs/configuring-playbook-synapse-usage-exporter.md Просмотреть файл

@@ -8,7 +8,7 @@ Enabling this service will automatically:


- install the synapse-usage-exporter service - install the synapse-usage-exporter service
- re-configure Synapse to push (via HTTP `PUT`) usage statistics information to synapse-usage-exporter - 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 - add a new [Grafana](./configuring-playbook-prometheus-grafana.md) dashboard (if Grafana is enabled) containing Synapse usage statistics


## Quickstart ## 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). # (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`. # 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. # 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 # matrix_synapse_usage_exporter_proxying_enabled: true
``` ```

+ 11
- 3
roles/custom/matrix-synapse-usage-exporter/defaults/main.yml Просмотреть файл

@@ -5,6 +5,11 @@


matrix_synapse_usage_exporter_enabled: false 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: # matrix_synapse_usage_exporter_identifier controls the identifier of this synapse-usage-exporter instance, which influences:
# - the default storage path # - the default storage path
# - the names of systemd services and containers # - the names of systemd services and containers
@@ -44,7 +49,10 @@ matrix_synapse_usage_exporter_container_additional_networks: []
# Extra arguments for the Docker container # Extra arguments for the Docker container
matrix_synapse_usage_exporter_container_extra_arguments: [] 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_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. # 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_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_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_priority: 0
matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "web-secure" 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' }}" matrix_synapse_usage_exporter_container_labels_traefik_tls: "{{ matrix_synapse_usage_exporter_container_labels_traefik_entrypoints != 'web' }}"


Загрузка…
Отмена
Сохранить