diff --git a/promtail.nomad b/promtail.nomad index d0f00b8..8c92e95 100644 --- a/promtail.nomad +++ b/promtail.nomad @@ -19,11 +19,11 @@ job "promtail" { } datacenters = ["dc1"] type = "system" - // constraint { - // attribute = "${node.class}" - // operator = "regexp" - // value = "32|64" - // } + constraint { + attribute = "${node.class}" + operator = "regexp" + value = "64" + } group "promtail" { count = 1 @@ -78,10 +78,15 @@ job "promtail" { args = ["-config.file=local/promtail.yml"] } + // artifact { + // source = "http://minio-api.service.consul:9000/loki-bin/promtail-linux-${attr.cpu.arch}.zip" + // destination = "local/promtail" + // mode = "file" + // } artifact { - source = "http://minio-api.service.consul:9000/loki-bin/promtail-linux-${attr.cpu.arch}.zip" - destination = "local/promtail" - mode = "file" + source = "https://github.com/grafana/loki/releases/download/v2.5.0/promtail-linux-arm64.zip" + destination = "local/promtail" + mode = "file" } diff --git a/promtail.yml.tpl b/promtail.yml.tpl index c9f97b2..a9b169c 100644 --- a/promtail.yml.tpl +++ b/promtail.yml.tpl @@ -9,14 +9,14 @@ clients: - url: http://loki-http-server.service.consul:3100/loki/api/v1/push scrape_configs: -- job_name: system +- job_name: consul static_configs: - targets: - localhost labels: job: consul - __path__: /var/log/consul*.log -- job_name: system + __path__: /home/consul/*.log +- job_name: nomad static_configs: - targets: - localhost