From c9096484d724edcb9866edcd8654cd99f38716c5 Mon Sep 17 00:00:00 2001 From: atlas Date: Thu, 29 Oct 2026 12:52:54 +0100 Subject: [PATCH] fold the container units into the one journalUnits definition --- nix/host-modules/otel.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/nix/host-modules/otel.nix b/nix/host-modules/otel.nix index 9b1df939..fa39ce43 100644 --- a/nix/host-modules/otel.nix +++ b/nix/host-modules/otel.nix @@ -343,18 +343,16 @@ in # not for agent containers. services.hyperhive.otel.scrapeTargets.collector = "127.0.0.1:${toString otel.telemetryPort}"; - # The unit whose crash-watch warning a swarm-level alert reads. - services.hyperhive.otel.journalUnits = [ "hive-c0re.service" ]; - - # A container's start-time output: the rootfs check's warn-only lines + # The unit whose crash-watch warning a swarm-level alert reads, and the + # container units' start-time output: the rootfs check's warn-only lines # and strict refusals (`hive-priv check-rootfs`, an `ExecStartPre=` of - # the unit) and nspawn's own start failures. `journalctl -u` takes the - # glob. A host that also runs the swarm collector ships its whole - # journal already (./swarm-otel.nix), so naming it there would send - # each line twice. - services.hyperhive.otel.journalUnits = lib.optionals ( - !config.services.hyperhive.deploy.swarm-otel.enable - ) [ "container@*.service" ]; + # the unit) and nspawn's own start failures. A host that also runs the + # swarm collector ships its whole journal already (./swarm-otel.nix), so + # naming the containers there would send each line twice. + services.hyperhive.otel.journalUnits = [ + "hive-c0re.service" + ] + ++ lib.optionals (!config.services.hyperhive.deploy.swarm-otel.enable) [ "container@*.service" ]; services.opentelemetry-collector = { enable = true;