diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-19 16:43:20 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-19 16:43:20 +0200 |
| commit | cf1abc83409fe36dc839d251115250765fd20091 (patch) | |
| tree | 341d9a1456db216af63aa9cced7af566e71c2e3d /modules | |
| parent | modules/monitoring/: Persist all state directories (diff) | |
| download | nixos-server-cf1abc83409fe36dc839d251115250765fd20091.zip | |
modules/monitoring/{prometheus,scrutiny}: Move smartctl exporting to scrutiny
Diffstat (limited to '')
| -rw-r--r-- | modules/by-name/mo/monitoring/components/prometheus.nix | 9 | ||||
| -rw-r--r-- | modules/by-name/mo/monitoring/components/scrutiny.nix | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/modules/by-name/mo/monitoring/components/prometheus.nix b/modules/by-name/mo/monitoring/components/prometheus.nix index 44c5952..395d71a 100644 --- a/modules/by-name/mo/monitoring/components/prometheus.nix +++ b/modules/by-name/mo/monitoring/components/prometheus.nix @@ -58,10 +58,6 @@ in { target = "127.0.0.1:${toString prom_cfg.exporters.node.port}"; } { - name = "smartctl"; - target = "127.0.0.1:${toString prom_cfg.exporters.smartctl.port}"; - } - { name = "prometheus_internal"; target = "127.0.0.1:${toString prom_cfg.port}"; } @@ -182,11 +178,6 @@ in { port = 9112; listenAddress = "127.0.0.1"; }; - smartctl = { - enable = true; - port = 9115; - listenAddress = "127.0.0.1"; - }; # services.prometheus.exporters.redis = lib.mkIf (builtins.length (lib.attrNames config.services.redis.servers) > 0) { # enable = true; # port = 9119; diff --git a/modules/by-name/mo/monitoring/components/scrutiny.nix b/modules/by-name/mo/monitoring/components/scrutiny.nix index 93212dd..70d413a 100644 --- a/modules/by-name/mo/monitoring/components/scrutiny.nix +++ b/modules/by-name/mo/monitoring/components/scrutiny.nix @@ -27,6 +27,10 @@ in { extra.metrics_path = "/api/metrics"; target = "127.0.0.1:${toString config.services.scrutiny.settings.web.listen.port}"; } + { + name = "smartctl"; + target = "127.0.0.1:${toString config.services.prometheus.exporters.smartctl.port}"; + } ]; grafana.dashboards = [ ../dashboards/Health.json @@ -98,6 +102,13 @@ in { }; }; }; + prometheus = { + exporters.smartctl = { + enable = true; + port = 9115; + listenAddress = "127.0.0.1"; + }; + }; }; # nixpkgs.overlays = [ |
