Enable metrics for matrix-synapse
This commit is contained in:
parent
71f7131b7d
commit
139033130f
4 changed files with 52 additions and 40 deletions
|
@ -1,8 +1,16 @@
|
|||
{ hosts, ... }:
|
||||
{ hosts, pkgs, ... }:
|
||||
let
|
||||
# https://github.com/element-hq/synapse/tree/master/contrib/prometheus/
|
||||
synapseRules = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/element-hq/synapse/refs/heads/master/contrib/prometheus/synapse-v2.rules";
|
||||
hash = "sha256-WldlBdCMzul49OlFhJMsrx4MYFakHTa36Y9HnV22EwI=";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
retentionTime = "90d";
|
||||
ruleFiles = [ synapseRules ];
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
|
@ -15,6 +23,14 @@
|
|||
};
|
||||
}) (builtins.attrNames hosts);
|
||||
}
|
||||
{
|
||||
job_name = "synapse";
|
||||
scrape_interval = "15s";
|
||||
metrics_path = "/_synapse/metrics";
|
||||
static_configs = [{
|
||||
targets = [ "matrix.vs.grzb.de:9000" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue