From 813afad3048a31fb3ad2a54a25f1b2679eb4ba59 Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 16 Dec 2021 15:02:39 +0100 Subject: [PATCH] nixos/journalbeat: Add a loose dependency on elasticsearch Avoid unnecssary back-off when elasticsearch is running on the same host. --- nixos/modules/services/logging/journalbeat.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/logging/journalbeat.nix b/nixos/modules/services/logging/journalbeat.nix index b34fb308f586..48b02142cb4c 100644 --- a/nixos/modules/services/logging/journalbeat.nix +++ b/nixos/modules/services/logging/journalbeat.nix @@ -88,6 +88,8 @@ in systemd.services.journalbeat = { description = "Journalbeat log shipper"; wantedBy = [ "multi-user.target" ]; + wants = [ "elasticsearch.service" ]; + after = [ "elasticsearch.service" ]; preStart = '' mkdir -p ${cfg.stateDir}/data mkdir -p ${cfg.stateDir}/logs