OPC UA, how to set datatype for specific node
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, yaml
- Domain
- backend, networking
Research direction
Start with nodevalue/client.go, especially the data type detection path referenced in the log, and review the configuration discussed in issue 54. Confirm how opcua.yml describes the target node and define completion as allowing the requested datatype to be set directly and successfully collecting that node's value.
Written by the indexing model from the issue text.
Description
Hello guys,
The datatype of the node I want to read is "BaseDataType", but I can not find the type, so the following error occurs.
- node info
- error log
2025-01-10T17:02:41.678+0900 INFO instance/beat.go:291 Setup Beat: machinebeat; Version: 7.17.9
2025-01-10T17:02:41.678+0900 DEBUG [beat] instance/beat.go:317 Initializing output plugins
2025-01-10T17:02:41.678+0900 DEBUG [publisher] pipeline/consumer.go:148 start pipeline event consumer
2025-01-10T17:02:41.678+0900 INFO [publisher] pipeline/module.go:113 Beat name: samsung-l22
2025-01-10T17:02:41.678+0900 DEBUG [registry.lightmodules] mb/lightmodules.go:262 Light modules directory '%!d(string=/home/samsung/machinebeat/module)' doesn't exist
2025-01-10T17:02:41.678+0900 DEBUG [modules] beater/metricbeat.go:151 Available modules and metricsets: Register [ModuleFactory:[], MetricSetFactory:[mqtt/topic, opcua/nodevalue], LightModules:[LightModules:[]]]
2025-01-10T17:02:41.678+0900 INFO [monitoring] log/log.go:142 Starting metrics logging every 30s
2025-01-10T17:02:41.678+0900 INFO instance/beat.go:456 machinebeat start running.
2025-01-10T17:02:41.679+0900 DEBUG [cfgfile] cfgfile/reload.go:132 Checking module configs from: /home/samsung/machinebeat/modules.d/*.yml
2025-01-10T17:02:41.679+0900 DEBUG [cfgfile] cfgfile/cfgfile.go:193 Load config from file: /home/samsung/machinebeat/modules.d/opcua.yml
2025-01-10T17:02:41.679+0900 DEBUG [cfgfile] cfgfile/reload.go:146 Number of module configs found: 1
2025-01-10T17:02:41.680+0900 WARN [cfgwarn] nodevalue/nodevalue.go:133 BETA: The OPCUA metricset is beta.
2025-01-10T17:02:41.680+0900 INFO nodevalue/client.go:75 [OPCUA] Get all endpoints from opc.tcp://127.0.0.1:4840
2025-01-10T17:02:41.681+0900 INFO nodevalue/client.go:85 [OPCUA] Your selected policy: http://opcfoundation.org/UA/SecurityPolicy#None and security mode: MessageSecurityModeNone
2025-01-10T17:02:41.681+0900 INFO nodevalue/client.go:95 [OPCUA] Policy URI: http://opcfoundation.org/UA/SecurityPolicy#None with security mode MessageSecurityModeNone
2025-01-10T17:02:41.681+0900 INFO nodevalue/client.go:103 [OPCUA] Set ApplicationName to machinebeat
2025-01-10T17:02:41.681+0900 INFO nodevalue/client.go:105 [OPCUA] Set ApplicationDescription (SAN DNS and SAN URL) to machinebeat
2025-01-10T17:02:41.681+0900 INFO nodevalue/client.go:118 [OPCUA] Set to anonymous login
2025-01-10T17:02:41.683+0900 INFO nodevalue/client.go:129 [OPCUA] Connection established
2025-01-10T17:02:41.683+0900 INFO nodevalue/nodevalue.go:176 Browsing is enabled. Data collection will start after discovery. Based on your server and browsing configuration this can take some time.
2025-01-10T17:02:41.684+0900 INFO nodevalue/client.go:376 [OPCUA] Start browsing node: ns=1;s=TCPSpeed_R0
2025-01-10T17:02:41.684+0900 DEBUG [Browse] nodevalue/client.go:420 Start browsing at
2025-01-10T17:02:41.684+0900 INFO nodevalue/client.go:426 Analyse node id ns=1;s=TCPSpeed_R0
2025-01-10T17:02:41.684+0900 DEBUG [Get DataType] nodevalue/client.go:526 Was not able to detect DataType
2025-01-10T17:02:41.685+0900 DEBUG [Browse] nodevalue/client.go:486 Found 0 new nodes for browsing with ref id 0
2025-01-10T17:02:41.685+0900 DEBUG [Browse] nodevalue/client.go:407 Found 0 nodes to collect data from so far
2025-01-10T17:02:41.685+0900 INFO nodevalue/client.go:409 Found 0 nodes in total to collect data from
2025-01-10T17:02:41.685+0900 DEBUG [Browse] nodevalue/nodevalue.go:181 Nodes to collect data from
2025-01-10T17:02:41.685+0900 INFO nodevalue/nodevalue.go:186 Browsing finished
2025-01-10T17:02:41.686+0900 INFO nodevalue/nodevalue.go:199 Found 0 nodes to collect data from.
Looking at this answer, it seems that there is a way to set the datatype directly
Is there any way to set datatype directly to opcua.yml?
- Dominant language
- Go
- Stars
- 79
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/Machinebeat
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
elastic/Machinebeat#60 · 1 comment ·
All issues in elastic/Machinebeat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·