Strange output with OPC input and Websockets output

Hi,
I am using the OPC input and the Websockets output and the messages look like this:

0: ["host=localhost, id=ns=2;i=6019", "host=localhost, id=ns=2;i=6020",…]
1: [1712615337602, 1712615337602, 1712615337602, 1712615337602, 1712615337602, 1712615337602,…]
2: [0, null, null, null, null, null, null, null, null, null, null, null, null]
3: ["OK (0x0)", "OK (0x0)", "OK (0x0)", "OK (0x0)", "OK (0x0)", "OK (0x0)", "OK (0x0)", "OK (0x0)",…]
4: [null, 0, null, null, null, null, null, null, null, null, null, null, null]
5: [null, null, 0, null, null, null, null, null, null, null, null, null, null]
6: [null, null, null, 0, null, null, null, null, null, null, null, null, null]
7: [null, null, null, null, 0, null, null, null, null, null, null, null, null]
8: [null, null, null, null, null, 46.11357116699219, null, null, null, null, null, null, null]
9: [null, null, null, null, null, null, 44.693050384521484, null, null, null, null, null, null]
10: [null, null, null, null, null, null, null, 1050, null, null, null, null, null]
11: [null, null, null, null, null, null, null, null, 62, null, null, null, null]
12: [null, null, null, null, null, null, null, null, null, 100.44715118408203, null, null, null]
13: [null, null, null, null, null, null, null, null, null, null, 33.551246643066406, null, null]
14: [null, null, null, null, null, null, null, null, null, null, null, 25.07175064086914, null]
15: [null, null, null, null, null, null, null, null, null, null, null, null, 3.363116314379561e-44]

resulting from the following OPC nodes

  nodes = [
   {name="Latitude", namespace="2", identifier_type="i", identifier="6019"},
   {name="Longitude", namespace="2", identifier_type="i", identifier="6020"},
   {name="EPY", namespace="2", identifier_type="i", identifier="6021"},
   {name="EPX", namespace="2", identifier_type="i", identifier="6022"},
...

So for each of the latter entries has only one non-null entry for the respective node ID as given in the first row. However, I would actually expect that there is either only one row with all the values or just one value in each row. Why is there this full matrix?

Thanks,
Florian

I’m not familiar with the websocket output of Telegraf, but this behavior might be related to the OPC UA input plugin emitting a metric for every node configured. What do you see if you use the file output or run telegraf with --test?

Aggregating the metrics into a single metric is supported natively with the telegraf/plugins/aggregators/merge at master · influxdata/telegraf · GitHub plugin.

1 Like