All materials
config.alloy
alloyconfig.alloy
discovery.docker "containers" {
host = "unix:///var/run/docker.sock"
}
loki.source.docker "app_logs" {
host = "unix:///var/run/docker.sock"
targets = discovery.docker.containers.targets
forward_to = [loki.write.default.receiver]
labels = {
job = "docker",
}
}
loki.write "default" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}