27 lines
520 B
Nix
27 lines
520 B
Nix
let
|
|
metrics_port = 9734;
|
|
in {
|
|
services.matrix-synapse = {
|
|
settings = {
|
|
enable_metrics = true;
|
|
listeners = [
|
|
{
|
|
port = metrics_port;
|
|
type = "metrics";
|
|
bind_addresses = [ "localhost" ];
|
|
tls = false;
|
|
resources = [];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
services.prometheus.scrapeConfigs = [
|
|
{
|
|
job_name = "matrix-synapse";
|
|
static_configs = [{
|
|
targets = [ "localhost:${builtins.toString metrics_port}"];
|
|
}];
|
|
}
|
|
];
|
|
}
|