// Alloy configuration — ships host and container logs to Loki. // One instance per host. Deployed to /opt/alloy/config/config.alloy. logging { level = "info" } // The alloy UI service listens on 127.0.0.1:12345 by default; the // in-container healthcheck probes it there. alloy 1.x refuses to // configure the ui service from a config block, so there is no block. // Ship logs to Loki (container name on the podman network). loki.write "default" { endpoint { url = "http://loki:3100/loki/api/v1/push" } } // Systemd journal from the host socket. loki.source.journal "journal" { format_as_json = true labels = { job = "systemd-journal", } forward_to = [loki.write.default.receiver] } // Container logs (podman storage path; adjust for docker). loki.source.file "containers" { targets = [ {__path__ = "/var/lib/containers/storage/overlay-containers/*/userdata/ctr.log", job = "podman"}, {__path__ = "/var/log/containers/*.log", job = "containers"}, ] forward_to = [loki.write.default.receiver] }