diff options
| author | Martin Fischer <martin@push-f.com> | 2025-12-26 11:24:44 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2025-12-26 11:25:08 +0100 |
| commit | 3498b31257e07876d5442cb15ed35ed822aea4fa (patch) | |
| tree | 2dcdb5eef86e9856c103f485a7ac0aaff89a1217 /nixos/hosts/tente | |
| parent | 3e451552935ab46d9bac7fc13cd20503e5482cbd (diff) | |
refactor: define prometheusScrapeConfigs in main modules
Diffstat (limited to 'nixos/hosts/tente')
| -rw-r--r-- | nixos/hosts/tente/default.nix | 14 | ||||
| -rw-r--r-- | nixos/hosts/tente/exporters.nix | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index cc97830..749f468 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -249,6 +249,20 @@ in ]; prometheusPort = ports.prometheus; prometheusNodeExporterPort = ports.prometheusNodeExporter; + prometheusScrapeConfigs = [ + { + job_name = "sql"; + static_configs = [{ + targets = ["localhost:${toString ports.prometheusSqlExporter}"]; + }]; + } + { + job_name = "storagebox"; + static_configs = [{ + targets = ["localhost:${toString ports.prometheusStorageboxExporter}"]; + }]; + } + ]; }; # Backups diff --git a/nixos/hosts/tente/exporters.nix b/nixos/hosts/tente/exporters.nix index eb46015..3a587e0 100644 --- a/nixos/hosts/tente/exporters.nix +++ b/nixos/hosts/tente/exporters.nix @@ -41,20 +41,5 @@ in port = cfg.storageboxExporterPort; hetznerTokenFile = config.age.secrets.hetzner-token.path; }; - - monitoring.prometheusScrapeConfigs = [ - { - job_name = "sql"; - static_configs = [{ - targets = [ "localhost:${toString cfg.sqlExporterPort}" ]; - }]; - } - { - job_name = "storagebox"; - static_configs = [{ - targets = [ "localhost:${toString cfg.storageboxExporterPort}" ]; - }]; - } - ]; }; } |
