influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.63k stars 5.58k forks source link

SOCKS support for HTTP Response plugin #11804

Open viliampucik opened 2 years ago

viliampucik commented 2 years ago

Use Case

We would like to use HTTP Response plugin to measure web page latency, however the page is accessible via a SOCKS proxy. The plugin support HTTP proxy, but not SOCKS.

Expected behavior

HTTP Response plugin supports SOCKS configuration.

Actual behavior

HTTP Response plugin ignores SOCKS related settings, such as socks5_enabled, socks5_address, socks5_username, socks5_password.

Additional info

No response

reimda commented 2 years ago

As far as I can tell, the http_response input only has support for http proxy. I think the only telegraf plugins that support socks are the websocket output and the kafka output.

Since telegraf does have some common code available to use, it may not be too difficult to add this to the http response input as a new feature. Would you be able to make the code changes using those output plugins as examples and submit a PR?