Skip to content
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

Support binding to a specific local address for http_response #5856

Closed
zoonage opened this issue May 15, 2019 · 2 comments · Fixed by #6006
Closed

Support binding to a specific local address for http_response #5856

zoonage opened this issue May 15, 2019 · 2 comments · Fixed by #6006
Labels
feature request Requests for new plugin and for new features to existing plugins good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS.
Milestone

Comments

@zoonage
Copy link

zoonage commented May 15, 2019

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Add a bind interface/IP address to the http_response plugin to force the request to egress via a specific interface

[[inputs.http_response]]
  address = "http://google.com"
  bind = "eth0"

Current behavior:

The request uses the default net.Dialer which selects an interface for the request.

Desired behavior:

To be able to specify an interface or IP address as the address to bind the http.Client to.

Use case:

For hosts that have VPN tunnels for a specific interface's traffic it is useful to check that you can send a request via this interface

@danielnelson
Copy link
Contributor

Sounds good, I think we should name the option interface since bind is something the server usually does. It seems like this is implemented with the LocalAddr field on the dialer? I guess we would use the first address assigned to the interface?

Is this something you could put together a pull request for?

@danielnelson danielnelson added the feature request Requests for new plugin and for new features to existing plugins label May 15, 2019
@zoonage
Copy link
Author

zoonage commented May 15, 2019

@danielnelson I'm unsure due to work commitments, but I'll give it a go

@glinton glinton added the good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS. label May 16, 2019
@danielnelson danielnelson added this to the 1.12.0 milestone Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins good first issue This is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants