From 4fb1c3a2bc9062a207ab1f92ac65d567ba38d346 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Tue, 5 Sep 2017 13:12:11 -0700 Subject: [PATCH] Add FAQ doc with dns resolver information --- docs/FAQ.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/FAQ.md diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 000000000..1a03d9368 --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,21 @@ +# Frequently Asked Questions + +### Q: Telegraf cannot resolve hostnames that are resolvable via `dig`, `host`, `nslookup`, etc. + +Go uses a pure Go resolver by default for [name resolution](https://golang.org/pkg/net/#hdr-Name_Resolution). +This resolver behaves differently than the C library functions but is more +efficient when used with the Go runtime. + +If you encounter problems or want to use more advanced name resolution methods +that are unsupported by the pure Go resolver, you can switch to the cgo +resolver. + +If running manually set: +``` +export GODEBUG=netdns=cgo +``` + +If running as a service add the environment variable to `/etc/default/telegraf`: +``` +GODEBUG=netdns=cgo +```