Skip to content

Supported Keys and Macros

This section provides a comprehensive list of the item keys and discovery rules supported by the OPC UA plugin.

Key Parameters Format

The first three connection parameters for all item keys follow this format: [ConnString][,User][,Password]

  • ConnString can be either an endpoint URI (e.g. opc.tcp://192.168.1.10:4840) or a named session defined in the configuration file.
  • If ConnString is a named session, User and Password are ignored in favor of the session settings.
  • If omitted, the default URI opc.tcp://localhost:4840 is used.

Item Keys

opcua.ping

Tests if the connection to the OPC UA server is alive by attempting to read node ns=0;i=2259 (ServerStatus.State).

Parameters:

Name Description Default
ConnString Endpoint URI or Session name opc.tcp://localhost:4840
User Username for authentication (empty)
Password Password for authentication (empty)

Returns:

  • 1 — Connection is alive and server state is Good.
  • 0 — Connection failed or server is unreachable.

opcua.info

Fetches server diagnostic metrics and certificate expiration data formatted as JSON.

Parameters:

Name Description Default
ConnString Endpoint URI or Session name opc.tcp://localhost:4840
User Username for authentication (empty)
Password Password for authentication (empty)

Returns:

JSON object containing server status details and certificate metadata:

JSON Field Description
state Server status name (Running, Failed, NoConfiguration, Suspended, Shutdown, Test, CommunicationFault, Unknown)
state_code Numeric server state code (0: Running, 1: Failed, ...)
start_time Server start time (RFC3339 format)
current_time Server current time (RFC3339 format)
current_session_count Number of currently active client sessions
current_subscription_count Number of active subscriptions
certificate.subject Certificate subject
certificate.issuer Certificate issuer
certificate.not_before Validity start date
certificate.not_after Expiration date
certificate.days_until_expiration Number of days remaining before expiration

opcua.get

Reads the value of a single OPC UA NodeID.

Parameters:

Name Description Default
ConnString Endpoint URI or Session name opc.tcp://localhost:4840
User Username for authentication (empty)
Password Password for authentication (empty)
NodeID Target NodeID string (e.g., ns=0;i=2258, ns=2;s=Factory.Line1.Temperature). (Mandatory)

Returns:

  • Raw node value (string, integer, float, boolean, etc.).

Discovery Rules

opcua.discovery

Recursively browses hierarchical references starting from RootNodeID to produce Zabbix Low-Level Discovery (LLD) JSON.

Parameters:

Name Description Accepted Values Default
ConnString Endpoint URI or Session name opc.tcp://localhost:4840
User Username for authentication (empty)
Password Password for authentication (empty)
RootNodeID Root NodeID to begin browsing Any valid NodeID ns=0;i=85 (ObjectsFolder)
NodeClassFilter Node class filter Variable, Object, Method, All Variable

Returns:

  • JSON array containing {#NODEID} and {#NODENAME} macros.

Macros

Macro Default Value Description
{$OPCUA.URI} opc.tcp://127.0.0.1:4840 OPC UA server endpoint URI or session name.
{$OPCUA.USER} Username for OPC UA authentication.
{$OPCUA.PASSWORD} Password for OPC UA authentication.