diff options
author | Rory& <root@rory.gay> | 2024-09-02 20:19:00 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-09-02 20:19:00 +0200 |
commit | a693745b35f7c534248e6ff0b00e9639c04ba39a (patch) | |
tree | 70b5583276729cc851e72bedb1753c1e11a11b8e /modules/monitoring/postgres.nix | |
parent | fix prom (diff) | |
download | Rory-Open-Architecture-a693745b35f7c534248e6ff0b00e9639c04ba39a.tar.xz |
Single scrape interval, add synapse label
Diffstat (limited to 'modules/monitoring/postgres.nix')
-rw-r--r-- | modules/monitoring/postgres.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/monitoring/postgres.nix b/modules/monitoring/postgres.nix index 5505892..25266fa 100644 --- a/modules/monitoring/postgres.nix +++ b/modules/monitoring/postgres.nix @@ -19,13 +19,13 @@ in ]; }; - services.prometheus.scrapeConfigs = ( - lib.map (interval: { - job_name = "postgres-${toString interval}s"; - scrape_interval = "${toString interval}s"; + services.prometheus.scrapeConfigs = [ + { + job_name = "postgres"; + scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } ]; - }) cfg.prometheusScrapeIntervals - ); + } + ]; services.grafana.provision.dashboards.settings = { apiVersion = 1; |