From dc2417f6a2163653b6eea550b73ee08233b36e3e Mon Sep 17 00:00:00 2001 From: Florian Zirker Date: Mon, 28 Mar 2022 21:47:16 +0200 Subject: [PATCH] Hostname repariert --- telegraf/docker-compose.yaml | 2 ++ telegraf/telegraf_net.conf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/telegraf/docker-compose.yaml b/telegraf/docker-compose.yaml index 91950d4..1d0ba59 100644 --- a/telegraf/docker-compose.yaml +++ b/telegraf/docker-compose.yaml @@ -30,6 +30,8 @@ services: - "docker.group=telegraf" dns: - ${LOCAL_DNS_SERVER} + environment: + - "HOST_NAME=${HOST_NAME}" networks: dockersocket: diff --git a/telegraf/telegraf_net.conf b/telegraf/telegraf_net.conf index c95263f..25a8e84 100644 --- a/telegraf/telegraf_net.conf +++ b/telegraf/telegraf_net.conf @@ -62,7 +62,7 @@ precision = "" ## Override default hostname, if empty use os.Hostname() - hostname = "" + hostname = "${HOST_NAME}" ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false