-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add server option to unbound plugin #3713
Conversation
233eed2
to
66a5574
Compare
plugins/inputs/unbound/unbound.go
Outdated
cmdArgs := []string{"stats_noreset"} | ||
|
||
if Server != "" { | ||
// Unbound control requires an IP address, and we want to be nice to the user | ||
serverIp, err := net.LookupIP(Server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you will need to net.SplitHostPort
and pass in only the host here.
plugins/inputs/unbound/unbound.go
Outdated
|
||
## IP of server to connect to, read from unbound conf default, optionally '@port' | ||
## Will lookup IP if given a hostname | ||
server = "127.0.0.1@8953" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use :
as separator
plugins/inputs/unbound/unbound.go
Outdated
cmdArgs := []string{"stats_noreset"} | ||
|
||
if Server != "" { | ||
// Unbound control requires an IP address, and we want to be nice to the user | ||
serverIp, err := net.LookupIP(Server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a resolver that can accept a timeout.
- Use Resolver with Timeout - Split port from host before resolving
@danielnelson How does it look now? I've been using it in production for last couple of weeks now |
This allows unbound plugin to connect to other servers
Required for all PRs: