All materials
config.alloy
alloyconfig.alloy
// Alloy configuration for Todorovi Wines lab
// Collects logs from Juice Shop and DVWA containers, forwards to Loki
discovery.docker "containers" {
host = "unix:///var/run/docker.sock"
}
loki.source.docker "juice_shop" {
host = "unix:///var/run/docker.sock"
targets = discovery.docker.containers.targets
labels = {
"service" = "juice-shop",
"app" = "todorovi-wines",
}
forward_to = [loki.write.local.receiver]
}
loki.source.docker "dvwa" {
host = "unix:///var/run/docker.sock"
targets = discovery.docker.containers.targets
labels = {
"service" = "dvwa",
"app" = "todorovi-wines",
}
forward_to = [loki.write.local.receiver]
}
loki.write "local" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}