Skip to content

Commit

Permalink
Update zfs collection service
Browse files Browse the repository at this point in the history
  • Loading branch information
simonswine committed Dec 9, 2023
1 parent e89dd2b commit e880529
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions modules/prometheus-node-exporter-zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ let
cfgTextfiles = config.services.prometheus-node-exporter-textfiles;

args = [
"--destination-path"
"--log-level"
"debug"
"--text-file-output"
"${cfgTextfiles.path}/zfs.prom"
] ++ cfg.extraArgs;
in
Expand All @@ -24,17 +26,11 @@ with lib;
config = mkIf cfg.enable {
services.prometheus-node-exporter-textfiles.enable = true;
systemd.services.prometheus-node-exporter-zfs = {
description = "Node exporter script for zfs snapshots and pools";
description = "Node exporter textfile daemon for zfs snapshots and pools";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.prometheus-node-exporter-zfs}/bin/node-exporter-zfs ${lib.escapeShellArgs args}";
};
};
systemd.timers.prometheus-node-exporter-zfs = {
timerConfig = {
OnBootSec = "1 min";
OnUnitActiveSec = "1 min";
};
wantedBy = [ "timers.target" ];
};
};
}

0 comments on commit e880529

Please sign in to comment.