From 1df5545835e4ddeb38ef47de3ac3b06d06b92faa Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 12 May 2023 10:11:30 -0700 Subject: [PATCH] Promtail: use local task dir rather than bind mount --- core/metrics/exporters.nomad | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/core/metrics/exporters.nomad b/core/metrics/exporters.nomad index 133384c..7560872 100644 --- a/core/metrics/exporters.nomad +++ b/core/metrics/exporters.nomad @@ -39,16 +39,9 @@ job "exporters" { config { image = "grafana/promtail:2.7.1" - args = ["-config.file=/etc/promtail/promtail.yml"] + args = ["-config.file=${NOMAD_TASK_DIR}/promtail.yml"] ports = ["promtail"] - # Mount config - mount { - type = "bind" - target = "/etc/promtail/promtail.yml" - source = "local/promtail.yml" - } - # Bind mount host machine-id and log directories mount { @@ -134,7 +127,7 @@ scrape_configs: - source_labels: ['__journal_com_hashicorp_nomad_task_name'] target_label: nomad_task_name EOF - destination = "local/promtail.yml" + destination = "${NOMAD_TASK_DIR}/promtail.yml" } resources {