job "vector" { datacenters = ["homelab", "hetzner"] priority = 50 type = "system" meta { forcedeploy = "0" } group "vector" { count = 1 network { port api { to = 8686 } } task "vector" { driver = "docker" config { image = "docker.service.consul:5000/timberio/vector:0.34.1-alpine" ports = ["api"] volumes = [ "/var/run/docker.sock:/var/run/docker.sock", ] } # docker socket volume mount env { VECTOR_CONFIG = "local/vector.toml" VECTOR_REQUIRE_HEALTHY = "true" } # resource limits are a good idea because you don't want your log collection to consume all resources available resources { cpu = 500 # 500 MHz memory = 256 # 256MB } # template with Vector's configuration template { destination = "local/vector.toml" change_mode = "signal" change_signal = "SIGHUP" # overriding the delimiters to [[ ]] to avoid conflicts with Vector's native templating, which also uses {{ }} left_delimiter = "[[" right_delimiter = "]]" data=<