nixos/journalbeat: Add a loose dependency on elasticsearch

Avoid unnecssary back-off when elasticsearch is running on the same
host.
This commit is contained in:
talyz 2021-12-16 15:02:39 +01:00
parent b617526c2b
commit 813afad304
No known key found for this signature in database
GPG Key ID: 2DED2151F4671A2B

View File

@ -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