collection took longer than expected; not complete after interval of 500m

Such as the title, I encountered this problem when using telegraf+opcua.

config:
[agent]
interval = “500ms”
metric_batch_size = 1500
metric_buffer_limit = 50000
collection_jitter = “0s”
flush_interval = “500ms”
flush_jitter = “100ms”
round_interval = false

I want to collect 1W of metrics every 500ms. Do not know how to configure, please help me.

Please take a look at these schemes for me:

  • Start multiple telegraf, 2(5000 *2) or 5(2000 *5) or 10(1000 * 10)
  • Increase interval, such as 1s. (This is the worst option.)

The message says exactly that the time it takes to collect data for one of your inputs takes more than 500ms. So it will not be possible to use such a small interval.

@Hipska It seems so. Is there a solution? What if I split it into multiple?
Also, is there any data on how many metrics telegraf+ua can support per second?

@Hipska I tried running multiple telegrams, and statistically, it performed better than one. But I wasn’t sure how much was appropriate, and it seemed to get worse when I started up 20 telegraf.

It all depends on how fast your nodes are sending the data to telegraf. You can split multiple inputs.opcua configs instead of having to run multiple telegraf instances.

There is also the opcua_listener, which might be also interesting for you.

1 Like

Yeah, I just thought of it.

@Hipska What’s the difference opcua and opcua_listener ?

The other makes a subscription to the data while the first one actively polls and reads it.