diff options
Diffstat (limited to 'modules/monitoring/synapse.nix')
-rw-r--r-- | modules/monitoring/synapse.nix | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix index 0271108..1d26f0e 100644 --- a/modules/monitoring/synapse.nix +++ b/modules/monitoring/synapse.nix @@ -4,17 +4,12 @@ let in { config = lib.mkIf (cfg.monitorAll && config.services.matrix-synapse.enable) { + services.matrix-synapse.settings.enable_metrics = true; services.matrix-synapse.settings.listeners = [ { - type = "http"; + type = "metrics"; port = 9200; tls = false; - resources = [ - { - names = [ "metrics" ]; - compress = false; - } - ]; } ]; @@ -58,14 +53,8 @@ in value = { worker_listeners = [ { - type = "http"; + type = "metrics"; port = 9200 + index + 1; - resources = [ - { - names = [ "metrics" ]; - compress = false; - } - ]; } ]; }; @@ -78,6 +67,7 @@ in job_name = "synapse-main-${toString interval}s"; scrape_interval = "${toString interval}s"; static_configs = [ { targets = [ "localhost:9200" ]; } ]; + metrics_path = "_synapse/metrics"; }) cfg.prometheusScrapeIntervals) ++ lib.flatten ( lib.imap ( @@ -86,6 +76,7 @@ in job_name = "synapse-${workerName}-${toString interval}s"; scrape_interval = "${toString interval}s"; static_configs = [ { targets = [ "localhost:${toString (9200 + index + 1)}" ]; } ]; + metrics_path = "_synapse/metrics"; }) cfg.prometheusScrapeIntervals ) config.monitoring.synapse.workerNames ) |