You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue is present only when interface is set to proper value in telegraf.conf
Relevant telegraf.conf for Windows:
[[inputs.http_response]]
## List of urls to query.urls = ["http://127.0.0.1:15000/hello", "http://[::1]:15000/hello"]
## Interface to use when dialing an addressinterface = "Loopback Pseudo-Interface 1"
Relevant telegraf.conf for Linux:
[[inputs.http_response]]
## List of urls to query.urls = ["http://127.0.0.1:15000/hello", "http://[::1]:15000/hello"]
## Interface to use when dialing an addressinterface = "lo"
Why Telegraf for Windows fails for IPv4 URL http://127.0.0.1:15000/hello and Telegraf for Linux fails for IPv6 URL http://[::1]:15000/hello?
It is because in this line
plugin chooses first available address for given interface. In my case it is IPv6 for Windows and IPv4 for Linux.
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.
Issue is present only when
interfaceis set to proper value intelegraf.confRelevant telegraf.conf for Windows:
Relevant telegraf.conf for Linux:
System info:
interfacewas 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/helloandhttp://[::1]:15000/hello(using web browser orcurl)Expected behavior:
http://127.0.0.1:15000/helloandhttp://[::1]:15000/hello.Actual behavior:
http://127.0.0.1:15000/helloandhttp://[::1]:15000/hello.http://[::1]:15000/helloURL:http://127.0.0.1:15000/helloURL:Additional info:
Why Telegraf for Windows fails for IPv4 URL
http://127.0.0.1:15000/helloand 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.