From fa78303253c2380f6fcb0918629f18d335310d5d Mon Sep 17 00:00:00 2001 From: Greg Szabo Date: Wed, 29 Aug 2018 14:54:22 -0400 Subject: [PATCH] DataDog hostname reporting fix --- .../roles/update-datadog-agent/templates/datadog.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networks/remote/ansible/roles/update-datadog-agent/templates/datadog.yaml.j2 b/networks/remote/ansible/roles/update-datadog-agent/templates/datadog.yaml.j2 index 7e35a5255..3c2e031dd 100644 --- a/networks/remote/ansible/roles/update-datadog-agent/templates/datadog.yaml.j2 +++ b/networks/remote/ansible/roles/update-datadog-agent/templates/datadog.yaml.j2 @@ -31,7 +31,7 @@ api_key: {{DD_API_KEY}} force_tls_12: yes # Force the hostname to whatever you want. (default: auto-detected) -hostname: {{inventory_hostname}} +hostname: {{inventory_hostname | replace ("_","-")}} # Make the agent use "hostname -f" on unix-based systems as a last resort # way of determining the hostname instead of Golang "os.Hostname()"