diff options
author | Rory& <root@rory.gay> | 2024-08-28 23:52:51 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-08-28 23:52:51 +0200 |
commit | 9c14b3cc7b33cbd864422e3bf9454722ae060508 (patch) | |
tree | c8a9266d9cd80d0985e8758557372f1decd28e04 | |
parent | Server changes (diff) | |
download | Rory-Open-Architecture-9c14b3cc7b33cbd864422e3bf9454722ae060508.tar.xz |
Fix synapse metrics
-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 ) |