Watch
0
0
Fork
You've already forked hyperhive
0

fold the container units into the one journalUnits definition

This commit is contained in:
atlas 2026-10-29 12:52:54 +01:00
commit c9096484d7

View file

@ -343,18 +343,16 @@ in
# not for agent containers. # not for agent containers.
services.hyperhive.otel.scrapeTargets.collector = "127.0.0.1:${toString otel.telemetryPort}"; services.hyperhive.otel.scrapeTargets.collector = "127.0.0.1:${toString otel.telemetryPort}";
# The unit whose crash-watch warning a swarm-level alert reads. # The unit whose crash-watch warning a swarm-level alert reads, and the
services.hyperhive.otel.journalUnits = [ "hive-c0re.service" ]; # container units' start-time output: the rootfs check's warn-only lines
# A container's start-time output: the rootfs check's warn-only lines
# and strict refusals (`hive-priv check-rootfs`, an `ExecStartPre=` of # and strict refusals (`hive-priv check-rootfs`, an `ExecStartPre=` of
# the unit) and nspawn's own start failures. `journalctl -u` takes the # the unit) and nspawn's own start failures. A host that also runs the
# glob. A host that also runs the swarm collector ships its whole # swarm collector ships its whole journal already (./swarm-otel.nix), so
# journal already (./swarm-otel.nix), so naming it there would send # naming the containers there would send each line twice.
# each line twice. services.hyperhive.otel.journalUnits = [
services.hyperhive.otel.journalUnits = lib.optionals ( "hive-c0re.service"
!config.services.hyperhive.deploy.swarm-otel.enable ]
) [ "container@*.service" ]; ++ lib.optionals (!config.services.hyperhive.deploy.swarm-otel.enable) [ "container@*.service" ];
services.opentelemetry-collector = { services.opentelemetry-collector = {
enable = true; enable = true;