synapse: generate metric endpoints automatically

This commit is contained in:
h7x4 2023-01-18 02:54:57 +01:00
parent e590e54862
commit c8d26e3c81
No known key found for this signature in database
GPG Key ID: 9F2F7D8250F35146
1 changed files with 4 additions and 9 deletions

View File

@ -206,15 +206,10 @@ in {
}; };
locations."/metrics/" = let locations."/metrics/" = let
endpoints = builtins.map (x: "matrix.pvv.ntnu.no/metrics/${x}") [ endpoints = lib.pipe cfg.workers.instances [
"master/1" (lib.mapAttrsToList (_: v: v))
"fed-sender/1" (map (w: "${w.type}/${toString w.index}"))
"fed-sender/2" (map (w: "matrix.pvv.ntnu.no/metrics/${w}"))
"fed-receiver/1"
"initial-sync/1"
"normal-sync/1"
"event-persist/1"
"user-dir/1"
]; ];
in { in {
alias = pkgs.writeTextDir "/config.json" alias = pkgs.writeTextDir "/config.json"