Telegraf and wss

I’m very new to telegraf, networking and influxdb and I’m having some trouble getting started.

I want to use:
wss://stream.binance.com:9443/ws/ethbtc@miniTicker
to pull data in but I’m getting the:
E! Service for input inputs.socket_listener failed to start, exiting listen tcp: address tcp/9443/ws/ethbtc@miniTicker

In my telegraf.conf I have set::

[[outputs.socket_writer]]
service_address = "tcp://stream.binance.com:9443/ws/ethbtc@miniTicker"
max_connections = 1024
read_timeout = "60s"
read_buffer_size = 65535
keep_alive_period = "5m"
data_format = "json"

I have a feeling I’m doing this very wrong but I can’t seem to find documentation on it that’s high enough level for a beginner to understand. Could someone point me in the right direction? Thanks!

Unfortunately we don’t have an input plugin that supports WebSockets currently, the socket_listener and socket_writer are only for tcp/udp/unix sockets.

1 Like

I would be interested in making a wss input plugin but I see some challenges. I feel like it would be hard to make it generic when so many websocket services have other semantics you have to perform first, like sending a message (often in some proprietary format) to start the stream. I would be willing to kick ideas around, though.