Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name

v0.1.0 · public · Published about 3 years ago

Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
Go Test

Sensu OPC-UA Checks

Table of Contents


The Sensu OPC-UA Checks are Sensu Checks that query Node values obtained from OPC-UA endpoints.
Note: These Sensu checks are built using the native Golang OPC-UA implementation

Usage examples



Sensu metrics for OPC-UA nodes

  sensu-opcua-metrics [flags]
  sensu-opcua-metrics [command]

Available Commands:
  help        Help about any command
  version     Print the version number of this plugin

  -e, --endpoint string         OP-CUA endpoint (default "opc.tcp://localhost:4840")
  -n, --nodes strings           Comma separated list of OP-CUA nodes to read (ex "ns=1;s=NODE_NAME1, ns=1;s=NODE_NAME2")
  -t, --tags strings            Comma separated list of additional metrics tags to add (ex: "first=value, second=value")
      --metrics-format string   Metrics Format (currently only prometheus supported) (default "prometheus")
      --dry-run                 Dry-run, do not communicate with endpoint, implies verbose
  -v, --verbose                 Enable verbose logging
  -h, --help                    help for sensu-opcua-metrics

Environment variables

Argument Environment Variable
--metrics-format OPCUA_METRICS_FORMAT


All arguments for these checks are tunable on a per entity or check basis based
on annotations. The annotations keyspace for this collection of checks is

NOTE: Due to check token substituion, supplying a template value such
as for description-template as a check annotation requires that you place the
desired template as a golang string literal (enlcosed in backticks)
within another template definition. This does not apply to entity annotations.


To customize the opcua endpoint for a given entity, you could use the following
sensu-agent configuration snippet:

# /etc/sensu/agent.yml example
annotations: 'opc.tpc://'


Asset registration

Sensu Assets are the best way to make use of this plugin. If you're not using an asset, please
consider doing so! If you're using sensuctl 5.13 with Sensu Backend 5.13 or later, you can use the
following command to add the asset:

sensuctl asset add sensu/sensu-opcua-checks

If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][].

Check definition


type: CheckConfig
api_version: core/v2
  name: sensu-opcua-metrics
  namespace: default
  command: >- 
    --endpoint "opc.tpc://" 
    --nodes "ns=1;s=NODE_NAME1, ns=1;s=NODE_NAME2"
  output_metric_format: prometheus_text
  - metric-storage
  - opcua
  - sensu/sensu-opcua-checks

Installation from source

The preferred way of installing and deploying this plugin is to use it as an Asset. If you would
like to compile and install the plugin from source or contribute to it, download the latest version
or create an executable script from this source.

From the local path of the sensu-opcua-checks repository:

go build

Additional notes


For more information about contributing to this plugin, see Contributing.

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.


You must be signed in to report this asset.

Sign In with Github



Either download the source code:

Download Source

Or download the asset definition: