Telegraf Modbus Plugin Conquer the Gateway's Connection Limit

I configure Telegraf’s Modbus plugin in order to connect to gateway of sensors and collect data. But at the same time 3 more agents go to the same gateway. If a gateway has 4 connection limit at the same time Telegraf gets all these 4 connections and the other guys can not collect data from that gateway.

I also set the [agent] plugin for all different interval combinations (default is ‘10s’) and also as we can understand from the plugin closing the connection by flush is only available for output plugins.

Can we close the Telegrafs connection after collect that data from Gateway?

Hi, there’s a new feature being added to Telegraf that adds the option to close the modbus connection after each gather cycle so it doesn’t monopolize the connections and prevent others from using them. I think the new feature covers your need.

The new feature is not in an official telegraf release yet, but you can still try it out through an alpha build. The alpha build is available here: Look for the latest comment saying “new artifacts were built” and click the little dropdown triangle to see links to the telegraf packages.

If you are able to try one of the alpha builds, make sure to comment on that pull request and share your experience, positive or negative. Your experience will help the developers who are working on the new code. Thanks!