OPCUA Telergraf plugin - identifier issue

Hi,

Im trying to use telegraf to read data from a OPC UA server and send it to influxDB.
I have however issue reading data from the OPC UA server, and I think it might be due to a issue with the “identifier” parameter in the plugin.

example:


Im trying to read the “M_Compressor_Ctrl”.“Ctrl”.“23FIC2B”.“Y”, so in my telegraf configuration i write the following:
nodes = [
{name=“23FIC2B_Y”, namespace=“3”, identifier_type=“s”, identifier=“M_Compressor_Ctrl.Ctrl.23FIC2B.Y”}
]
Then i receive the following Error:
2022-02-02T15:19:00Z E! [inputs.opcua] status not OK for node 23FIC2B_Y: The node id refers to a node that does not exist in the server address space. StatusBadNodeIDUnknown (0x80340000)

If i however try to write the following in the telegraf configuration:
nodes = [
{name=“23FIC2B_Y”, namespace=“3”, identifier_type=“s”, identifier=“M_Compressor_Ctrl”}
]

I get no errors from the OPC UA Plugin, but of course…no value as M_Compressor_Ctrl is just the first part of the path.

Can anyone help me with this issue?

Hi @AgriSwanson,
Sadly this might be based on a known issue at the moment: Issue with Telegraf OPC UA Input Plugin

To check could we try and use the full path while escaping the quotations:

"\“M_Compressor_Ctrl\”.\“Ctrl\”.\“23FIC2B\”.\“Y\”"

@AgriSwanson I’ve added my solution to the thread mentioned by @Jay_Clifford and I’m copying it here for clarity. You need to enclosure the full identifier including double quotes with single quotes:

{name="23FIC2B_Y", namespace="3", identifier_type="s", identifier='"M_Compressor_Ctrl"."Ctrl"."23FIC2B"."Y"'}

This will make it a literal string, see TOML: Tom's Obvious Minimal Language. And I dont know if it matters, but be aware of the difference between and ".

1 Like

Thank you for this @R290!

I am also use telegraf OPC UA plugin to connect to Schneider OPC server but its giving “connection failed” IO timeout error… kindly help