Telegraf OPC UA ingest and visualisation slow


I have an OPC UA server receiving MQTT subscriptions from three devices, each producing roughly 2 data points per second.

My telegraf conf looks like this:

    name = "opcua-server"
    endpoint = "opc.tcp://opcua-server:4840"
    connect_timeout = "20s"
    security_policy = "None"
    security_mode = "None"
    auth_method = "Anonymous"
    name = "knauer_p2.1"
    namespace = "2"
    identifier_type = "i"
    nodes = [
     {name="pressure", identifier="8", tags=[["device_num", "1"]]},
     {name="set_point", identifier="9", tags=[["device_num", "1"]]},
    name = "knauer_p10"
    namespace = "2"
    identifier_type = "i"
    nodes = [
     {name="pressure", identifier="13", tags=[["device_num", "1"]]},
     {name="set_point", identifier="14", tags=[["device_num", "1"]]},
    name = "polar_bear"
    namespace = "2"
    identifier_type = "i"
    nodes = [
     {name="temperature", identifier="3", tags=[["device_num", "1"]]},
     {name="set_point", identifier="4", tags=[["device_num", "1"]]},

and my query:

from(bucket: "telegraf")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "knauer_p10" or r["_measurement"] == "knauer_p2.1" or r["_measurement"] == "polar_bear")
  |> filter(fn: (r) => r["_field"] == "pressure" or r["_field"] == "temperature")
  |> filter(fn: (r) => r["device_num"] == "1")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

On the server side, OPC UA is set to output every 100ms and using UaExpert (OPC UA client) I can see updates roughly every 500ms as I expect - is it possible for influxdb to plot at this speed?

From what I can see, 1s is the fastest I can select from the dropdown menu. However, even with this selected, data isn’t plotted even though the graph moves - it takes about 3s for data to appear? This also seems to affect Grafana even though I’ve selected 500 ms refresh rate. Is this something to do with my telegraf conf or my query?

I understand that the OPC UA plugin polls rather than listen for subscriptions - would listening to the MQTT messages directly be faster?


Hello @om327,
Yes I believe the fastesto autorefresh for OSS is 1s. For Cloud it’s 10s.
But let me ask our OPC UA expert here and see if he has any tips.
@Jay_Clifford any thoughts here?