From 7f025e2b343a7c9fae2b76822d12449a511c2e88 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Fri, 3 Jun 2022 10:45:27 +0200 Subject: [PATCH] netdata: started when service can be pinged --- nixos/modules/services/monitoring/netdata.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index f528d1830424..489dd337bb7c 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -201,6 +201,8 @@ in { serviceConfig = { ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c /etc/netdata/netdata.conf"; ExecReload = "${pkgs.util-linux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID"; + ExecPostStart = ''while [ "$(netdatacli ping)" != pong ]; do sleep 0.5; done''; + TimeoutStopSec = 60; Restart = "on-failure"; # User and group