Files
motovaultpro/config/alloy/config.alloy
Eric Gullickson 1b20673ff6 chore: replace Promtail with Grafana Alloy for log collection (refs #97)
Promtail 2.9.0 embeds Docker client API v1.42 which is incompatible with
Docker Engine v29 (minimum API v1.44). Grafana Alloy v1.12.2 resolves this
by using a compatible Docker client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 19:04:41 -06:00

30 lines
716 B
Plaintext

discovery.docker "containers" {
host = "unix:///var/run/docker.sock"
refresh_interval = "5s"
}
discovery.relabel "containers" {
targets = discovery.docker.containers.targets
rule {
source_labels = ["__meta_docker_container_name"]
regex = "/(.*)"
target_label = "container"
}
rule {
source_labels = ["__meta_docker_container_label_com_docker_compose_service"]
target_label = "service"
}
}
loki.source.docker "containers" {
host = "unix:///var/run/docker.sock"
targets = discovery.relabel.containers.output
forward_to = [loki.write.default.receiver]
}
loki.write "default" {
endpoint {
url = "http://mvp-loki:3100/loki/api/v1/push"
}
}