From 2b46f1e9ed4ab20f0ea81bc41e5a2fbe7e1fb79f Mon Sep 17 00:00:00 2001 From: = Date: Thu, 30 Mar 2023 10:23:32 +0200 Subject: [PATCH] added hostname label --- promtail/init.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promtail/init.sls b/promtail/init.sls index 31f36bb..8063111 100644 --- a/promtail/init.sls +++ b/promtail/init.sls @@ -38,7 +38,7 @@ adding fw service for promtail in {{ zone }} zone: Create promtail container: cmd.run: - - name: podman container create --name promtail -p {{ http_listen_port }}:{{ http_listen_port}} -v /etc/promtail:/etc/promtail:ro -v /var/log/journal:/var/log/journal:ro docker.io/grafana/promtail:latest -config.file=/etc/promtail/promtail.conf + - name: podman container create --name promtail -p {{ http_listen_port }}:{{ http_listen_port}} -v /etc/promtail:/etc/promtail:ro -v /var/log/journal:/var/log/journal:ro docker.io/grafana/promtail:latest -config.file=/etc/promtail/promtail.conf --client.external-labels=hostname={{ grains['fqdn'] }} - unless: podman container exists promtail Create promail unit file: