From 62fb7f7c127ca8aee56b3903ee207dec766d0a11 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 28 Aug 2024 21:40:53 +0200 Subject: Monitoring? --- .../services/matrix/synapse/workers/single/appservice.nix | 6 +++++- .../services/matrix/synapse/workers/single/background.nix | 6 +++++- host/Rory-nginx/services/matrix/synapse/workers/single/user-dir.nix | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'host/Rory-nginx/services/matrix/synapse/workers/single') diff --git a/host/Rory-nginx/services/matrix/synapse/workers/single/appservice.nix b/host/Rory-nginx/services/matrix/synapse/workers/single/appservice.nix index 315a322..119fd04 100644 --- a/host/Rory-nginx/services/matrix/synapse/workers/single/appservice.nix +++ b/host/Rory-nginx/services/matrix/synapse/workers/single/appservice.nix @@ -11,10 +11,14 @@ let }; in let - enabledResources = lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; + enabledResources = + lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] + ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] + ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; in { config = lib.mkIf cfg.enableAppserviceWorker { + monitoring.synapse.workerNames = [ workerName ]; services.matrix-synapse = { settings = { instance_map = { diff --git a/host/Rory-nginx/services/matrix/synapse/workers/single/background.nix b/host/Rory-nginx/services/matrix/synapse/workers/single/background.nix index b667e19..37fde10 100644 --- a/host/Rory-nginx/services/matrix/synapse/workers/single/background.nix +++ b/host/Rory-nginx/services/matrix/synapse/workers/single/background.nix @@ -13,10 +13,14 @@ let }; in let - enabledResources = lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; + enabledResources = + lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] + ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] + ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; in { config = lib.mkIf cfg.enableBackgroundWorker { + monitoring.synapse.workerNames = [ workerName ]; services.matrix-synapse = { settings = { instance_map = { diff --git a/host/Rory-nginx/services/matrix/synapse/workers/single/user-dir.nix b/host/Rory-nginx/services/matrix/synapse/workers/single/user-dir.nix index 89c6aa4..f26f3ec 100644 --- a/host/Rory-nginx/services/matrix/synapse/workers/single/user-dir.nix +++ b/host/Rory-nginx/services/matrix/synapse/workers/single/user-dir.nix @@ -16,10 +16,14 @@ let }; in let - enabledResources = lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; + enabledResources = + lib.optionals (lib.length workerRoutes.client > 0) [ "client" ] + ++ lib.optionals (lib.length workerRoutes.federation > 0) [ "federation" ] + ++ lib.optionals (lib.length workerRoutes.media > 0) [ "media" ]; in { config = lib.mkIf cfg.enableUserDirWorker { + monitoring.synapse.workerNames = [ workerName ]; services.matrix-synapse = { settings = { instance_map = { -- cgit 1.4.1