From b3c5e9ac1ea20a3b21568c618b7699571d9122f4 Mon Sep 17 00:00:00 2001 From: volth Date: Sat, 26 Jan 2019 00:31:32 +0000 Subject: [PATCH] nixos/collectd: restart on failure `collectd' might fail because of a failure in any of numerous plugins. For example `virt' plugin sometimes fails if `collectd' is started before `libvirtd' --- nixos/modules/services/monitoring/collectd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix index 6606980cdad8..45e3312c0f44 100644 --- a/nixos/modules/services/monitoring/collectd.nix +++ b/nixos/modules/services/monitoring/collectd.nix @@ -88,6 +88,8 @@ in { ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -f"; User = cfg.user; PermissionsStartOnly = true; + Restart = "on-failure"; + RestartSec = 3; }; preStart = ''