summary refs log tree commit diff
path: root/modules/monitoring
diff options
context:
space:
mode:
Diffstat (limited to 'modules/monitoring')
-rw-r--r--modules/monitoring/crutches/synapse.nix4
-rw-r--r--modules/monitoring/module.nix8
-rw-r--r--modules/monitoring/postgres.nix4
-rw-r--r--modules/monitoring/synapse.nix8
-rw-r--r--modules/monitoring/system.nix6
5 files changed, 20 insertions, 10 deletions
diff --git a/modules/monitoring/crutches/synapse.nix b/modules/monitoring/crutches/synapse.nix

index 3145d11..7028396 100644 --- a/modules/monitoring/crutches/synapse.nix +++ b/modules/monitoring/crutches/synapse.nix
@@ -1,10 +1,10 @@ -{lib, ...}: +{ lib, ... }: { options.monitoring.synapse = { workerNames = lib.mkOption { type = lib.types.listOf lib.types.str; - default = []; + default = [ ]; description = "Synapse worker names"; }; }; diff --git a/modules/monitoring/module.nix b/modules/monitoring/module.nix
index 62ff1ea..f47c483 100644 --- a/modules/monitoring/module.nix +++ b/modules/monitoring/module.nix
@@ -40,7 +40,13 @@ in prometheus = lib.mkIf (cfg.localPrometheus) { enable = true; listenAddress = "127.0.0.1"; - extraFlags = [ "--storage.tsdb.wal-compression" ]; + extraFlags = [ + "--storage.tsdb.wal-compression" + "--query.max-concurrency 128" + "--rules.max-concurrent-evals 64" + "--storage.tsdb.retention.size 250GB" + "--enable-feature concurrent-rule-eval" + ]; }; grafana = lib.mkIf (cfg.localGrafana) { enable = true; diff --git a/modules/monitoring/postgres.nix b/modules/monitoring/postgres.nix
index 25266fa..63f536b 100644 --- a/modules/monitoring/postgres.nix +++ b/modules/monitoring/postgres.nix
@@ -23,7 +23,9 @@ in { job_name = "postgres"; scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; - static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } ]; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } + ]; } ]; diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix
index a000698..ccc4ae2 100644 --- a/modules/monitoring/synapse.nix +++ b/modules/monitoring/synapse.nix
@@ -42,7 +42,7 @@ in [ { job_name = "synapse-main"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:9200" ]; @@ -55,7 +55,7 @@ in ++ lib.flatten ( lib.imap (index: workerName: { job_name = "synapse-${workerName}"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:${toString (9200 + index + 1)}" ]; @@ -75,8 +75,8 @@ in type = "file"; options = { path = builtins.fetchurl { - url = "https://raw.githubusercontent.com/element-hq/synapse/master/contrib/grafana/synapse.json"; - sha256 = "07qlr0waw9phmyd38bv22bn5v303w3397b89l44l3lzwhpnhs16s"; + url = "https://raw.githubusercontent.com/element-hq/synapse/develop/contrib/grafana/synapse.json"; + sha256 = "16fl81sx1by0wldw4vda0zr1pvbq1dpih1fikzwlvmk63mpc80kb"; }; }; } diff --git a/modules/monitoring/system.nix b/modules/monitoring/system.nix
index 171a7af..7e2634b 100644 --- a/modules/monitoring/system.nix +++ b/modules/monitoring/system.nix
@@ -49,8 +49,10 @@ in services.prometheus.scrapeConfigs = [ { job_name = "node"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; - static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } ]; + scrape_interval = "5s"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } + ]; } ];