From 3127b9b8f77dc92767fc6f338e1ee0b1b3b9439e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 18 Oct 2021 18:03:57 -0500 Subject: [PATCH] r/synapse: Enable Prometheus metrics Synapse supports exporting metrics in Prometheus format. It can do this either as part of the main server, or in a separate listener. I chose to use a separate listener so that the metrics are not exposed publicly. --- roles/synapse/templates/homeserver.yaml.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/synapse/templates/homeserver.yaml.j2 b/roles/synapse/templates/homeserver.yaml.j2 index 09068a7..5c8b2ae 100644 --- a/roles/synapse/templates/homeserver.yaml.j2 +++ b/roles/synapse/templates/homeserver.yaml.j2 @@ -22,6 +22,10 @@ listeners: resources: - names: [client, federation] compress: false +- type: metrics + port: 9000 + bind_addresses: + - 0.0.0.0 retention: @@ -38,6 +42,7 @@ registration_shared_secret: '{{ synapse_registration_shared_secret }}' account_threepid_delegates: +enable_metrics: true metrics_flags: report_stats: false