From 3053f9b2f7252bd351435534fd054f836ae54bfc Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Fri, 21 Oct 2022 19:22:45 +0200 Subject: [PATCH] Automatic metrics listener --- synapse-module/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/synapse-module/default.nix b/synapse-module/default.nix index e888298..3b9dedd 100644 --- a/synapse-module/default.nix +++ b/synapse-module/default.nix @@ -277,7 +277,7 @@ in description = "disable presence tracking, if you're having perfomance issues this can have a big impact"; default = true; }; - +/ options.listeners = lib.mkOption { type = lib.types.listOf (lib.types.submodule { options.port = lib.mkOption { @@ -342,6 +342,13 @@ in { names = [ "replication" ]; } ]; }) + (lib.mkIf cfg.settings.enable_metrics { + port = 9000; + bind_addresses = [ "127.0.0.1" ]; + resources = [ + { names = [ "metrics" ]; } + ]; + }) ]; };