Collection took longer than expected; not complete after interval of 10s

Hi @vkhemani,

The " collection took longer than expected…" error message means that the time it took for Telegraf to start collecting, send the request to the OPCUA server over the network, have the OPCUA server handle the request, respond to the request over the network, and then Telegraf process the response, was longer than the “1s” interval that you set. As a result, the next interval is skipped, hence why you see results every 2 seconds.

With an interval setting of 1s, you are expecting all the operations I listed above to happen within a second. This is entirely possible with many Telegraf plugins. However, based on some previous posts in this forum here and here and issue reports with OPC UA, it does seem that a 1s interval when interacting with OPC UA can be too small.

This is entirely dependent on the server you are connecting to, the network you are using to connect to it, and the amount of data you are querying at a given time. The first forum link above shows one possible workaround where you split up your opcua telegraf config as one option to possibly workaround this.

If you wanted someone to look at your config or Telegraf logs in more detail, I would suggest opening a new topic.

Hope that helps!