All materials
config.alloy
alloyconfig.alloy
// Grafana Alloy configuration for Gintaro Kelias lab
// Collects logs from application containers and forwards to Loki
discovery.docker "containers" {
host = "unix:///var/run/docker.sock"
}
loki.source.docker "default" {
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"
}
}