influxdata / telegraf

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

Websocket Input plugin #12914

Open vinodborole opened 1 year ago

vinodborole commented 1 year ago

Use Case

The current socket_listener input plugin is only able to receive data from the other end; as websocket supports bi-directional communication; there is a use case wherein the client (telegraf) requests for data from other end based on a query and receives the data; this should support a polling mechanism

Expected behavior

Accepts a configuration like below for websocket input plugin along with a polling interval

ws://IP/query

polling interval = [sec/millisecond]

data_format = json

Actual behavior

Based on the query passed, the endpoint will send the data in json format that can be later pushed to the output plugin

Additional info

No response

Hipska commented 1 year ago

As mentioned on Slack, there ia already a PR with initial support for such a plugin where someone can take over the current codebase: #8867