forked from Drift/pvv-nixos-config
synapse: generate metric endpoints automatically
This commit is contained in:
parent
e590e54862
commit
c8d26e3c81
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue