job "syslogng" { datacenters = ["dc1"] type = "service" group "promtail" { count = 1 network { mode = "bridge" port "main" { to = 1514 } port "metrics" { to = 9080 } } service { name = "syslogng-promtail" port = "main" connect { sidecar_service { proxy { local_service_port = 1514 upstreams { destination_name = "loki" local_bind_port = 1000 } } } sidecar_task { resources { cpu = 50 memory = 20 memory_max = 50 } } } } task "promtail" { driver = "docker" config { image = "grafana/promtail:2.2.1" ports = ["main", "metrics"] args = ["--config.file=/etc/promtail/promtail.yml"] mount { type = "bind" target = "/etc/promtail/promtail.yml" source = "local/promtail.yml" } } template { data = <