influxdata / telegraf

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

[inputs.modbus] Modbus UDP Feature Resquest #10664

Open theruskian opened 2 years ago

theruskian commented 2 years ago

Feature Request

Add the ability to use Modbus/TCP over a UDP transport.

Proposal:

Add the ability to poll Modbus/TCP slaves over UDP controller = "udp://localhost:502"

Current behavior:

controller = "tcp://localhost:502" modbus plugin establishes a TCP connection to the modbus slaves and polls registers

Desired behavior:

controller = "udp://localhost:502" modbus plugin send modbus request over UDP to poll registers

Use case:

Modbus slaves that support UDP would benefit from the reduced overhead especially when telegraf isn't the only master polling the device for data. The same RTUoverTCP and ASCIIoverTCP options could remain.

powersj commented 2 years ago

Telegraf uses this modbus go library to establish connections. I would suggest filing a feature request upstream to request this feature and then Telegraf could make use of it.

Until the upstream support is in place, I think we are better off closing this issue for now.

Thanks

theruskian commented 6 days ago

@powersj Hi Joshua,

I believe the upstream support is now available. Would it be possible to re-open this request?

https://github.com/grid-x/modbus/issues/50#issuecomment-1485305707 Solved by https://github.com/grid-x/modbus/pull/85

powersj commented 3 days ago

Would it be possible to re-open this request?

Done - are you planning to put up a PR?