aboutsummaryrefslogtreecommitdiff
path: root/nixos/hosts/ev
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-12-26 11:24:44 +0100
committerMartin Fischer <martin@push-f.com>2025-12-26 11:25:08 +0100
commit3498b31257e07876d5442cb15ed35ed822aea4fa (patch)
tree2dcdb5eef86e9856c103f485a7ac0aaff89a1217 /nixos/hosts/ev
parent3e451552935ab46d9bac7fc13cd20503e5482cbd (diff)
refactor: define prometheusScrapeConfigs in main modules
Diffstat (limited to 'nixos/hosts/ev')
-rw-r--r--nixos/hosts/ev/default.nix8
-rw-r--r--nixos/hosts/ev/exporters.nix9
2 files changed, 8 insertions, 9 deletions
diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix
index c5abe4d..5d6de93 100644
--- a/nixos/hosts/ev/default.nix
+++ b/nixos/hosts/ev/default.nix
@@ -164,6 +164,14 @@ in
lokiPort = ports.grafanaLoki;
prometheusPort = ports.prometheus;
prometheusNodeExporterPort = ports.prometheusNodeExporter;
+ prometheusScrapeConfigs = [
+ {
+ job_name = "sql";
+ static_configs = [{
+ targets = ["localhost:${toString ports.prometheusSqlExporter}"];
+ }];
+ }
+ ];
};
# Backups
diff --git a/nixos/hosts/ev/exporters.nix b/nixos/hosts/ev/exporters.nix
index 1c03c35..097e3e5 100644
--- a/nixos/hosts/ev/exporters.nix
+++ b/nixos/hosts/ev/exporters.nix
@@ -29,14 +29,5 @@ in
collectors = helpers.collectors;
};
};
-
- monitoring.prometheusScrapeConfigs = [
- {
- job_name = "sql";
- static_configs = [{
- targets = [ "localhost:${toString cfg.sqlExporterPort}" ];
- }];
- }
- ];
};
}