Loading nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix +8 −6 Original line number Diff line number Diff line Loading @@ -2,14 +2,17 @@ let cfg = config.services.prometheus.exporters.smartctl; inherit (lib) mkOption types literalExpression; args = lib.escapeShellArgs ([ "--web.listen-address=${cfg.listenAddress}:${toString cfg.port}" "--smartctl.path=${pkgs.smartmontools}/bin/smartctl" "--smartctl.interval=${cfg.maxInterval}" ] ++ map (device: "--smartctl.device=${device}") cfg.devices ++ cfg.extraFlags); in { in { port = 9633; extraOpts = { Loading @@ -24,6 +27,7 @@ in { all disks if none given. ''; }; maxInterval = mkOption { type = types.str; default = "60s"; Loading @@ -50,9 +54,7 @@ in { "block-sd rw" "char-nvme rw" ]; ExecStart = '' ${pkgs.prometheus-smartctl-exporter}/bin/smartctl_exporter ${args} ''; ExecStart = "${pkgs.prometheus-smartctl-exporter}/bin/smartctl_exporter ${args}"; PrivateDevices = lib.mkForce false; ProtectProc = "invisible"; ProcSubset = "pid"; Loading Loading
nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix +8 −6 Original line number Diff line number Diff line Loading @@ -2,14 +2,17 @@ let cfg = config.services.prometheus.exporters.smartctl; inherit (lib) mkOption types literalExpression; args = lib.escapeShellArgs ([ "--web.listen-address=${cfg.listenAddress}:${toString cfg.port}" "--smartctl.path=${pkgs.smartmontools}/bin/smartctl" "--smartctl.interval=${cfg.maxInterval}" ] ++ map (device: "--smartctl.device=${device}") cfg.devices ++ cfg.extraFlags); in { in { port = 9633; extraOpts = { Loading @@ -24,6 +27,7 @@ in { all disks if none given. ''; }; maxInterval = mkOption { type = types.str; default = "60s"; Loading @@ -50,9 +54,7 @@ in { "block-sd rw" "char-nvme rw" ]; ExecStart = '' ${pkgs.prometheus-smartctl-exporter}/bin/smartctl_exporter ${args} ''; ExecStart = "${pkgs.prometheus-smartctl-exporter}/bin/smartctl_exporter ${args}"; PrivateDevices = lib.mkForce false; ProtectProc = "invisible"; ProcSubset = "pid"; Loading