// Alloy configuration — ships host and container logs to Loki. // One instance per host. Deployed to /opt/alloy/config/config.alloy. // // Runs as a ROOT system service on Network=host (see // dankclaw/observability/quadlet/alloy.container), so it reaches Loki on the // host's loopback and reads every journal — host services and rootless-quadlet // containers alike. logging { level = "info" } // The alloy UI listens on 127.0.0.1:12345; the in-container healthcheck probes // it there. alloy 1.x refuses to configure the ui service from a config block, // so there is no ui block. // Loki is published on the host's loopback (127.0.0.1:3100). Alloy shares the // host network, so it pushes by loopback, never by container name — a root // container is not on the rootless dankclaw_default network. loki.write "default" { endpoint { url = "http://127.0.0.1:3100/loki/api/v1/push" } } // The systemd journal. As root with /etc/machine-id + the journal dirs mounted, // this one source reads system.journal AND user-*.journal, so it carries both // host services and the rootless Quadlet containers' logs. There is deliberately // no container-file source: podman container stdout lands in the journal, and // the old /var/lib/containers/.../ctr.log and /var/log/containers globs pointed // at a root-storage layout that does not exist on this host. loki.source.journal "journal" { format_as_json = true labels = { job = "systemd-journal", } forward_to = [loki.write.default.receiver] }