Telegraf / opcua input plugin : StatusBadTooManyOperations

Hey,

Is there a way to split OPC UA input requests ?
When using embedded devices, the max number of operation per request is often limited (i.e. 100). When reading more than this limit, the following error appears :

[inputs.opcua] Error in plugin: registerNodes failed: The request could not be processed because it specified too many operations. StatusBadTooManyOperations (0x80100000)

The client is supposed to break out the request in several request to adapt to the server capabilities.
I’ve tried to split in batch of 100 nodes it in the configuration file but it doesn’t seem to be enough.

Any idea ?
Any plan to improve that ?
Is this a gopcua library limitation ?

(I’m using 1.19.3 in a Docker environment)
Thanks.

Hi @quenorha,
Have you tried to split 100 nodes into separate OPC UA client plugins? Then set a different interval time for each?

Hi @Jay_Clifford ,
Yes I tried to split into differents packets of 100 nodes but without success.
What do you mean by “set a different interval time for each” ?
Thanks for your reply.

For example:

###############################################################################
#                            INPUT PLUGINS                                    #
###############################################################################
[[inputs.opcua]]
interval = 10s
collection_jitter = 5s
  ## Metric name
  name = "opcua-nodes-1-20"
  #
  ## OPC UA Endpoint URL
  endpoint = "opc.tcp://localhost:49330"
  #
  ## Maximum time allowed to establish a connect to the endpoint.
  # connect_timeout = "10s"
  #
  ## Maximum time allowed for a request over the estabilished connection.
  # request_timeout = "5s"
  #

[[inputs.opcua]]
interval = 15s
collection_jitter = 5s
  ## Metric name
  name = "opcua-nodes-21-50"
  #
  ## OPC UA Endpoint URL
  endpoint = "opc.tcp://localhost:49330"
  #
  ## Maximum time allowed to establish a connect to the endpoint.
  # connect_timeout = "10s"
  #
  ## Maximum time allowed for a request over the estabilished connection.
  # request_timeout = "5s"
  #

This would help to spread out the requests to your server so 100 nodes are not trying to be collected all at once.

I will try this ASAP.
Thanks