diff options
author | Nejc Zupan <nejc.zupan@gmail.com> | 2020-04-08 20:58:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 20:58:06 +0100 |
commit | 479c521af98ade85b5910a87db5177443467c370 (patch) | |
tree | 71df75a06ca93d4133d5069649a7ed574d5f0676 /nixos | |
parent | 05f3d961a986569f462d7e9989e8ac5c223c35aa (diff) | |
download | nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar.gz nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar.bz2 nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar.lz nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar.xz nixpkgs-479c521af98ade85b5910a87db5177443467c370.tar.zst nixpkgs-479c521af98ade85b5910a87db5177443467c370.zip |
Automatically restart netdata on failures
I've had Netdata crash on me sometimes. Rarely but more than once. And I lost days of data before I noticed. Let's be nice and restart it on failures by default.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/netdata.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index e43241eea89..a5233a46e34 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -154,6 +154,7 @@ in { ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c ${configFile}"; ExecReload = "${pkgs.utillinux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID"; TimeoutStopSec = 60; + Restart = "on-failure"; # User and group User = cfg.user; Group = cfg.group; |