-
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
http_response plugin have issues when urls list contains IPv4 and IPv6 addresses #8451
Comments
Hi @zak-pawel, Would this be an issue for anything other than URLs using localhost? If not, I'm wondering if we document this and move on? Thanks! |
@powersj Yes, it would. Lets assume I have interface IPv4:
IPv6:
( I can
( telegraf.conf:
Telegraf output:
Same error, same problem (tested on current I assume that the same problem will exist for Windows for these addresses, but don't have possibility to check right now. |
It sounds like the following would need to happen:
Does that sound about right? |
@zak-pawel is this something you still want to resolve? If so could you look at the above? |
@powersj Sure, I'll propose a solution and open a PR. Sorry, I must have missed your comment from 2022... :/ |
Issue is present only when
interface
is set to proper value intelegraf.conf
Relevant telegraf.conf for Windows:
Relevant telegraf.conf for Linux:
System info:
interface
was added to plugin here: Add support for interface field in http_response input plugin #6006 - so from Telegraf 1.12.0)Steps to reproduce:
http://127.0.0.1:15000/hello
andhttp://[::1]:15000/hello
(using web browser orcurl
)Expected behavior:
http://127.0.0.1:15000/hello
andhttp://[::1]:15000/hello
.Actual behavior:
http://127.0.0.1:15000/hello
andhttp://[::1]:15000/hello
.http://[::1]:15000/hello
URL:http://127.0.0.1:15000/hello
URL:Additional info:
Why Telegraf for Windows fails for IPv4 URL
http://127.0.0.1:15000/hello
and Telegraf for Linux fails for IPv6 URLhttp://[::1]:15000/hello
?It is because in this line
telegraf/plugins/inputs/http_response/http_response.go
Line 209 in b39c197
Would it work if any address ordering solution is provided (so the same address would be chosen
independently from OS type)?
No, they would just fail for the same address type. Other address type would still not work. It is because HTTP Client with chosen address is configured per plugin and not per provided URL.
The text was updated successfully, but these errors were encountered: