Hello everyone,
I’m having an issue with the Telegraf OPC UA Client Input Plugin.
I want to collect machine Data from a Fanuc OPC UA Server [running on a VM] with Telegraf, write the data to an InfluxDB2 an visualize everything with grafana.
Now I’m having trouble with the data collection part. The telegraf log always tells me, that the node does not exist in the server adress space.
I double checked my telegraf.conf and verified that the node is existing and available with the UaExpert Client [see screenshot] and a nodejs opcua client.
Has anyone an idea how to solve this issue?
Thanks in advance,
Joachim
Ua Expert Screenshot:
Log of my telegraf docker container:
2021-10-21T08:16:49Z I! Starting Telegraf 1.20.2,
2021-10-21T08:16:49Z I! Using config file: /etc/telegraf/telegraf.conf,
2021-10-21T08:16:49Z I! Loaded inputs: opcua,
2021-10-21T08:16:49Z I! Loaded aggregators: ,
2021-10-21T08:16:49Z I! Loaded processors: ,
2021-10-21T08:16:49Z I! Loaded outputs: influxdb_v2,
2021-10-21T08:16:49Z I! Tags enabled: host=f4a9b73bb9fb,
2021-10-21T08:16:49Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"f4a9b73bb9fb", Flush Interval:10s,
2021-10-21T08:16:49Z I! Failed to load certificate: open /etc/telegraf/cert.pem: no such file or directory,
2021-10-21T08:16:50Z E! [inputs.opcua] status not OK for node ServerVersion: The node id refers to a node that does not exist in the server address space. StatusBadNodeIDUnknown (0x80340000)
Because I’m a new user I’m not allowed to upload attachments so here is the content of my telegraf.conf:
[global_tags]
# Configuration for telegraf agent
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# # Configuration for sending metrics to InfluxDB
[[outputs.influxdb_v2]]
urls = ["http://influxdb:8086"]
#
# ## Token for authentication.
token = "myInfluxDBToken"
#
# ## Organization is the name of the organization you wish to write to; must exist.
organization = "MyOrganization"
#
# ## Destination bucket to write into.
bucket = "MyBucket"
###############################################################################
# INPUT PLUGINS #
###############################################################################
# # Retrieve data from OPCUA devices
[[inputs.opcua]]
## Metric name
name = "opcua"
#
## OPC UA Endpoint URL
endpoint = "opc.tcp://172.20.103.175:59611"
# endpoint = "opc.tcp://FANUC-OPC:59611"
#
## 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"
#
## Security policy, one of "None", "Basic128Rsa15", "Basic256",
## "Basic256Sha256", or "auto"
security_policy = "None"
#
## Security mode, one of "None", "Sign", "SignAndEncrypt", or "auto"
security_mode = "None"
#
## Path to cert.pem. Required when security mode or policy isn't "None".
## If cert path is not supplied, self-signed cert and key will be generated.
# certificate = "/etc/telegraf/cert.pem"
#
## Path to private key.pem. Required when security mode or policy isn't "None".
## If key path is not supplied, self-signed cert and key will be generated.
# private_key = "/etc/telegraf/key.pem"
#
## Authentication Method, one of "Certificate", "UserName", or "Anonymous". To
## authenticate using a specific ID, select 'Certificate' or 'UserName'
auth_method = "UserName"
#
## Username. Required for auth_method = "UserName"
username = "username"
#
## Password. Required for auth_method = "UserName"
password = "password"
nodes = [
{name="ServerVersion", namespace="2", identifier_type="s", identifier="SVR.SERVER_VERSION"}
]