Closed sarim closed 1 year ago
Hi,
Interesting request. My initial thought is to write a script and use an exec
input plugin to do this. Although I can see adding these to HTTP might be helpful as well.
Next steps: look into what would be required to add this to the existing HTTP input plugin and if it s feasible versus using the exec plugin.
Thanks
Interesting request. My initial thought is to write a script and use an
exec
input plugin to do this.
That's an interesting idea, This should work for now. Thanks a lot.
Next steps: look into what would be required to add this to the existing HTTP input plugin and if it s feasible versus using the exec plugin.
This should be relatively easy. Need to set DialContext
here. If unix socket is set, dial to socket path, if not dial using net. Maybe I can work on this, should I start a PR?
Maybe I can work on this, should I start a PR?
Always happy to see a PR
Feature Request
Basically
curl --unix-socket /run/something.sock http://magic/url/something
Proposal:
add unix-socket option to http input plugin.
Current behavior:
No option to specify unix-socket option.
Desired behavior:
Ability to use unix-socket to make the http request.
Use case:
As the goal of telegraf is collecting data, and many services listen to sockets. For example podman.
There are many endpoints in libpod api returning various data, easily parseable with json in telegraf. But it needs to dial the unix socket.