diff options
author | Antoine Eiche <lewo@abesis.fr> | 2020-03-17 22:12:48 +0100 |
---|---|---|
committer | Antoine Eiche <lewo@abesis.fr> | 2020-03-17 22:18:20 +0100 |
commit | 39621bb8dea088997f001f4ac6fdd00214e07a93 (patch) | |
tree | 739e354ff1486de3cd53653224139ac61e618a49 /nixos | |
parent | 0bd52ef94daf8b6693ece51980fce8902985de84 (diff) |
nixos/alertmanager: start after the network-online target
If the host network stack is slow to start, the alertmanager fails to
start with this error message:
caller=main.go:256 msg="unable to initialize gossip mesh" err="create memberlist: Failed to get final advertise address: No private IP address found, and explicit IP not provided"
This bug can be reproduced by shutting down the network stack and
restarting the alertmanager.
Note I don't know why I didn't hit this issue with previous
alertmanager releases.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/alertmanager.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/alertmanager.nix b/nixos/modules/services/monitoring/prometheus/alertmanager.nix index 4534d150885e..69e3dcf14085 100644 --- a/nixos/modules/services/monitoring/prometheus/alertmanager.nix +++ b/nixos/modules/services/monitoring/prometheus/alertmanager.nix @@ -155,7 +155,7 @@ in { systemd.services.alertmanager = { wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; + after = [ "network-online.target" ]; preStart = '' ${lib.getBin pkgs.envsubst}/bin/envsubst -o "/tmp/alert-manager-substituted.yaml" \ -i "${alertmanagerYml}" |