From cd84f87581299e9eb68337f84db5b4b03dfee109 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 17 Mar 2020 09:18:00 -0400 Subject: [PATCH] ensure name uniformity for elascticsearch and telegraf/grafana --- salt/common/telegraf/etc/telegraf.conf | 2 +- salt/utility/bin/eval | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/common/telegraf/etc/telegraf.conf b/salt/common/telegraf/etc/telegraf.conf index 6b9f8caa3..b08f2aac2 100644 --- a/salt/common/telegraf/etc/telegraf.conf +++ b/salt/common/telegraf/etc/telegraf.conf @@ -80,7 +80,7 @@ logfile = "/var/log/telegraf/telegraf.log" ## Override default hostname, if empty use os.Hostname() - hostname = "{{ grains.id }}" + hostname = "{{ grains.host }}" ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false diff --git a/salt/utility/bin/eval b/salt/utility/bin/eval index 853693044..7ff0ef886 100644 --- a/salt/utility/bin/eval +++ b/salt/utility/bin/eval @@ -28,4 +28,4 @@ fi echo "Applying cross cluster search config..." curl -s -XPUT http://{{ ES }}:9200/_cluster/settings \ -H 'Content-Type: application/json' \ - -d "{\"persistent\": {\"search\": {\"remote\": {\"{{ grains.id }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}" + -d "{\"persistent\": {\"search\": {\"remote\": {\"{{ grains.host }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}"