Files
serverAppConfigs/shared/alloy/config.alloy
T
Frank 1f4766f233 observability: fix alloy ui component, busybox healthchecks for loki/alloy
- alloy 1.x renamed the server component to ui; the old block failed the
  initial load and the container crash-looped
- grafana/loki is distroless and grafana/alloy lacks wget, so their
  healthchecks could never run; local images add a static busybox from
  alpine for that one command
- deploy.sh builds all three local images if missing
- tests: 3 new seams
2026-08-22 03:59:14 -07:00

39 lines
988 B
Plaintext

// Alloy configuration — ships host and container logs to Loki.
// One instance per host. Deployed to /opt/alloy/config/config.alloy.
logging {
level = "info"
}
// Local listener so the container healthcheck can probe us.
// Alloy >= 1.0 renamed the server component to ui.
ui {
host = "0.0.0.0"
port = 12345
}
// 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]
}