-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FAQ doc with dns resolver information
- Loading branch information
1 parent
cd40999
commit 4ec13c1
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |