job "promtail" { datacenters = ["homelab", "hetzner"] priority = 50 type = "system" meta { forcedeploy = "0" } group "promtail" { network { mode = "host" port "http" { static = 3200 } } task "promtail" { driver = "docker" service { name = "promtail" port = "http" check { name = "Promtail HTTP" type = "http" path = "/targets" interval = "5s" timeout = "2s" check_restart { limit = 2 grace = "60s" ignore_warnings = false } } } config { image = "grafana/promtail" ports = ["http"] dns_servers= ["192.168.1.10","192.168.1.4"] args = [ "-config.file=/local/promtail.yml", "-server.http-listen-port=${NOMAD_PORT_http}", ] volumes = [ "/opt/nomad/:/nomad/" ] } env { HOSTNAME = "${attr.unique.hostname}" } template { data = <[-_\w]*)\.std.*\.\d*' - labels: task_file: EOTC destination = "/local/promtail.yml" } resources { memory = 100 } } } }