Enable exposure of Prometheus metrics.
This commit is contained in:
@ -13,6 +13,9 @@ matrix_synapse_container_expose_client_server_api_port: false
|
||||
# Controls whether the Appservice IRC container exposes the Client/Server API port (tcp/9999).
|
||||
matrix_appservice_irc_container_expose_client_server_api_port: false
|
||||
|
||||
# Controls whether the matrix-synapse container exposes the metrics port (tcp/9100).
|
||||
matrix_synapse_container_expose_metrics_port: false
|
||||
|
||||
# List of systemd services that matrix-synapse.service depends on
|
||||
matrix_synapse_systemd_required_services_list: ['docker.service']
|
||||
|
||||
@ -118,6 +121,11 @@ matrix_synapse_app_service_config_files: []
|
||||
# any password providers have been enabled or not.
|
||||
matrix_synapse_password_providers_enabled: false
|
||||
|
||||
# Enable exposure of metrics to Prometheus
|
||||
# See https://github.com/matrix-org/synapse/blob/master/docs/metrics-howto.rst
|
||||
matrix_synapse_metrics_enabled: false
|
||||
matrix_synapse_metrics_port: 9100
|
||||
|
||||
# Postgres database information
|
||||
matrix_synapse_database_host: ""
|
||||
matrix_synapse_database_user: ""
|
||||
|
@ -127,6 +127,12 @@ federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_js
|
||||
# List of ports that Synapse should listen on, their purpose and their
|
||||
# configuration.
|
||||
listeners:
|
||||
{% if matrix_synapse_metrics_enabled %}
|
||||
- type: metrics
|
||||
port: {{ matrix_synapse_metrics_port }}
|
||||
bind_addresses:
|
||||
- '0.0.0.0'
|
||||
{% endif %}
|
||||
{% if matrix_synapse_federation_enabled %}
|
||||
# Main HTTPS listener
|
||||
# For when matrix traffic is sent directly to synapse.
|
||||
@ -496,7 +502,7 @@ autocreate_auto_join_rooms: {{ matrix_synapse_autocreate_auto_join_rooms }}
|
||||
## Metrics ###
|
||||
|
||||
# Enable collection and rendering of performance metrics
|
||||
enable_metrics: False
|
||||
enable_metrics: {{ matrix_synapse_metrics_enabled }}
|
||||
report_stats: {{ matrix_synapse_report_stats|to_json }}
|
||||
|
||||
|
||||
|
@ -34,6 +34,9 @@ ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
|
||||
{% if matrix_synapse_container_expose_client_server_api_port %}
|
||||
-p 127.0.0.1:8008:8008 \
|
||||
{% endif %}
|
||||
{% if matrix_synapse_container_expose_metrics_port %}
|
||||
-p 127.0.0.1:{{ matrix_synapse_metrics_port }}:{{ matrix_synapse_metrics_port }} \
|
||||
{% endif %}
|
||||
-v {{ matrix_synapse_config_dir_path }}:/data:ro \
|
||||
-v {{ matrix_synapse_run_path }}:/matrix-run:rw \
|
||||
-v {{ matrix_synapse_base_path }}/storage:/matrix-media-store-parent:slave \
|
||||
|
Reference in New Issue
Block a user