From db0b5df83df325eaadd5aac508963d65d6d7f366 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Sun, 24 May 2026 10:26:41 +0200 Subject: [PATCH] fluentbit: fix unit startup --- modules/blocks/monitoring.nix | 14 ++++++++------ test/blocks/monitoring.nix | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/blocks/monitoring.nix b/modules/blocks/monitoring.nix index 1e06c84..62ac507 100644 --- a/modules/blocks/monitoring.nix +++ b/modules/blocks/monitoring.nix @@ -629,13 +629,15 @@ in host = "localhost"; port = config.services.loki.configuration.server.http_listen_port; - labels = { - job = "systemd-journal"; - domain = cfg.domain; - hostname = config.networking.hostName; - }; + labels = lib.traceValSeq ( + lib.concatMapAttrsStringSep ", " (n: v: "${n}=${v}") { + job = "systemd-journal"; + domain = cfg.domain; + hostname = config.networking.hostName; + } + ); - label_keys = "unit"; + label_keys = "$unit"; } ]; }; diff --git a/test/blocks/monitoring.nix b/test/blocks/monitoring.nix index f667a1b..addb172 100644 --- a/test/blocks/monitoring.nix +++ b/test/blocks/monitoring.nix @@ -9,6 +9,9 @@ let { ... }: [ "grafana.service" + "fluent-bit.service" + "loki.service" + "netdata.service" ]; waitForPorts = { node, ... }: