Skip to content

feat(common.opcua): Add string configuration option for node ID#18232

Open
skartikey wants to merge 5 commits intoinfluxdata:masterfrom
skartikey:inputs_opcua_nodeid
Open

feat(common.opcua): Add string configuration option for node ID#18232
skartikey wants to merge 5 commits intoinfluxdata:masterfrom
skartikey:inputs_opcua_nodeid

Conversation

@skartikey
Copy link
Contributor

@skartikey skartikey commented Jan 19, 2026

Summary

Adds support for specifying OPC UA node IDs using the standard string format (e.g., ns=0;i=2262 or nsu=http://...;s=Name) as an alternative to specifying namespace, identifier_type, and identifier separately.

  • Users can now configure nodes using the simpler node_id string that matches what OPC UA browsers display
  • The existing configuration style using individual fields (namespace, identifier_type, identifier) continues to work unchanged
  • Both styles can be used in the same configuration file (but not for the same node)

New style (recommended for simplicity):

  [[inputs.opcua.nodes]]                                                                                                                                                                                                           
    name = "ProductUri"                                                                                                                                                                                                            
    id = "ns=0;i=2262"    

Existing style (still fully supported):

  [[inputs.opcua.nodes]]                                                                                                                                                                                                           
    name = "ProductUri"                                                                                                                                                                                                            
    namespace = "0"                                                                                                                                                                                                                
    identifier_type = "i"                                                                                                                                                                                                          
    identifier = "2262"   

Supported node ID formats:

Checklist

Related issues

resolves #12396

…ration option

- Add support for specifying OPC UA node IDs using the standard string format
  (e.g., "ns=0;i=2262" or "nsu=http://...;s=Name") as an alternative to
  specifying namespace, identifier_type, and identifier separately.
- This simplifies configuration and matches the format used in OPC UA browsers.

Example usage:

  {name="ProductUri", node_id="ns=0;i=2262"}

Instead of:

  {name="ProductUri", namespace="0", identifier_type="i", identifier="2262"}
@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jan 19, 2026
@skartikey skartikey self-assigned this Jan 19, 2026
@skartikey skartikey changed the title feat(inputs.opcua, inputs.opcua_listener): Add node_id string configu… feat(inputs.opcua, inputs.opcua_listener): Add node_id string configuration option Jan 20, 2026
@skartikey skartikey assigned srebhan and mstrandboge and unassigned skartikey Jan 20, 2026
@srebhan srebhan changed the title feat(inputs.opcua, inputs.opcua_listener): Add node_id string configuration option feat(common.opcua): Add string configuration option for node ID Jan 28, 2026
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @skartikey! Some comments from my side.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job @skartikey!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Feb 10, 2026
@srebhan srebhan assigned mstrandboge and unassigned srebhan Feb 10, 2026
@telegraf-tiger
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/opcua feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(inputs.opcua+inputs.opcua_listener) Support node id string in config

3 participants