Skip to main content
Version: 5.6

Metrics Export

The OPC Router continuously collects runtime metrics and can export them to external monitoring systems such as Grafana, Prometheus, or InfluxDB. A subset of the metrics can be viewed directly in the Service Dashboard.

Enterprise+ add-on license required

Exporting metrics via OTLP or InfluxDB requires an active Enterprise+ license. For more information on license assignment and other Enterprise+ features, see License Levels. Some system-wide metrics (CPU, memory, drives) are recorded internally regardless of this and displayed in the Service Dashboard.

Configuration

The settings can be found under Tools → Settings → Metrics Export.

OTLP

PropertyDescription
EnabledEnables OTLP export
EndpointDestination address of the OTLP collector, e.g., http://localhost:4317
ProtocolTransmission protocol: gRPC (default) or HTTP/Protobuf
HeaderOptional HTTP headers, e.g., for authentication (Authorization: Bearer ...)

InfluxDB

PropertyDescription
EnabledEnables the InfluxDB export
EndpointURL of the InfluxDB instance, e.g., http://localhost:8086
OrganizationInfluxDB organization
BucketTarget bucket
TokenAPI token for authentication
Flush Interval (ms)How often collected metrics are written (default: 1,000 ms)
Export Interval (ms)Measurement interval (default: 60,000 ms)

System Instrumentation

PropertyDescriptionDefault
.NET Runtime.NET runtime metrics (GC, thread pool, etc.)Enabled
ProcessProcess metrics (CPU time, memory)Active
ASP.NET CoreHTTP server metricsInactive
HTTP ClientMetrics for outbound HTTP requestsInactive
Event CountersWindows Event Counter sourcesInactive

How to Interpret the Metrics

For analysis, not only the metric name is important, but also the metric type:

TypeMeaningTypical Use
GaugeSnapshot of a current stateCurrent load, queue size, status
CounterMonotonically increasing counterNumber of errors, successful executions, connection attempts
HistogramDistribution of measured valuesLatences, processing times, message sizes

Many metrics are also exported with attributes, such as the connection name. This allows the same metric to be analyzed separately for each connection, plug-in, or target system.

Combine multiple metrics for a meaningful analysis

Individual metrics are often only meaningful when combined. For example, an increasing queue depth is only problematic if worker utilization remains high or processing times increase at the same time.

Value Mapping for Status Metrics

Some status metrics are exported as numeric values. Therefore, a fixed value table should be used for dashboards and alerts.

inray.service.escalation_level

Describes the global health status of the OPC router.

ValueMeaningPractical Interpretation
-2UndefinedStatus cannot yet be determined
-1InitializingService is still initializing internal components
0EscalationLevel0Normal operation
1EscalationLevel1Good, highly repetitive transfer values are partially discarded
2EscalationLevel2Good transfer values are discarded
3EscalationLevel3Transfer values are completely discarded
4EscalationLevel4Normal-priority messages are discarded

inray.connections.state

Describes the current state of a connection.

ValueMeaningPractical Interpretation
-1NullNo valid connection state yet
0StartUpConnection is starting
1ValidateConnection is being validated
2ReadyConnection is ready for operation
3TriggerCheckErrorError during trigger check
4TriggerStatusErrorError in trigger status
5TriggerConfigErrorError in trigger configuration
6PlugInErrorError in a involved plug-in
7NoLicenseLicense is missing or invalid
8ShutDownConnection is being terminated or has been shut down
9StandByConnection is inactive but still exists

inray.connections.execution.state

Describes the result of the last executed connection.

ValueMeaningPractical Interpretation
0NoneNo execution yet or no result available
1OkLast execution successful
2AbortedExecution was aborted
3ErrorExecution ended with an error
4PendingExecution is still pending
5ForwardedExecution was forwarded
6DiscardedExecution was discarded

inray.connections.trigger.state and inray.connections.trigger.async.status

Describes the state of a connection’s trigger.

ValueMeaningPractical Interpretation
0NoneNo valid trigger status available yet
1OkTrigger is functioning properly
2StatusErrorTrigger reports a status error
3CheckErrorTrigger check failed
4ConfigErrorTrigger is configured incorrectly

inray.plugins.instance.status

Describes the status of a plugin instance.

ValueMeaningPractical Interpretation
0UninitializedThe plugin has not yet been initialized
1InitializingThe plugin is starting up or initializing resources
2OkThe plugin is functioning properly
3WarningThe plugin is running but reporting warnings
4ErrorThe plugin is faulty
5StoppedThe plugin has been stopped
6NoLicensePlug-in cannot run due to a missing license

inray.opcua.connection_manager.state

Describes the connection status of the OPC UA Connection Manager.

ValueMeaningPractical Interpretation
0DisconnectedNo active connection to the OPC UA server
1ConnectedConnection established
2InvalidConfigConnection cannot be established due to an invalid configuration

Available Metrics

All metrics have the prefix inray. and can be enriched with attributes (dimensions) such as the connection name or the plug-in type.

Not all metrics are always available

Plugin-specific metrics are exported only if the respective plugin is licensed and active. Which metrics are actually provided depends on the configuration and runtime state of the OPC Router.

Service & System

General health metrics for the OPC Router service and the host system.

Useful for:

  • Monitoring the overall health of the service
  • Identifying CPU, memory, or disk space bottlenecks
  • Triggering alerts for critical operating conditions

These include, among others, the following metrics:

MetricTypeUnitDescription
inray.service.escalation_levelGauge-Global health status of the OPC router; the numerical values should be interpreted using the value table above
inray.service.used_memory_bytesGaugeBytesMemory usage of the process
inray.system.processor_usageGauge%CPU utilization of the host system
inray.system.memory_usageGauge%Memory utilization of the host system
inray.system.free_memory_bytesGaugeBytesAvailable memory
inray.drives.{Drive}.free_bytesGaugeBytesFree space per drive
inray.drives.{Drive}.total_bytesGaugeBytesTotal size per drive

Transfer Manager

Metrics for the OPC Router’s internal processing scheduler. These values form the basis of the Service Dashboard.

Useful for:

  • Identifying bottlenecks in the processing path
  • Assessing whether enough worker threads are available
  • Analyzing whether increasing latencies are caused by load or by individual slow transfers

Verifying the System Load Gauge in the Dashboard

The System Load Balance gauge in the Service Dashboard is based directly on these two metrics:

  • Regular: inray.transfer_manager.default_prio_average_workload
  • High Prio: inray.transfer_manager.high_prio_average_workload

The calculation is performed in three steps:

  1. For each worker thread, a workload sample is generated per measurement interval:
load_sample = activeMs / (activeMs + idleMs)

Here, activeMs is the time during which the thread is actually processing transfers, and idleMs is the time during which the thread is waiting.

  1. The OPC Router stores the average of the last up to 10 samples for each worker thread:
load_thread = (load_sample_1 + load_sample_2 + ... + load_sample_n) / n

where n <= 10.

  1. For the selected time period, the dashboard reads all stored values for the respective metric and calculates the arithmetic mean from them:
load_dashboard = (load_thread_1 + load_thread_2 + ... + load_thread_m) / m

The gauge is then displayed as a percentage:

Display in % = load_dashboard * 100

Example:

  • A dashboard value of 0.37 corresponds to a displayed system load of 37 %.
  • A dashboard value of 0.85 corresponds to 85% and indicates a high, sustained load.
  • If no values are available for the selected time period, the gauge displays N/A.

Important for interpretation:

  • The gauge does not show the host’s CPU utilization, but rather the utilization of the transfer workers over time.
  • The gauge displays an averaged trend, not an instantaneous value of a single thread.
  • For Regular, the values for normal and low priority are used; for High Prio, the values for high-priority workers are used.

This includes, among others, the following metrics:

MetricTypeUnitDescription
inray.transfer_manager.queue_depthGaugeItemsNumber of transfer executions currently waiting across all priorities; a continuously rising value indicates a backlog
inray.transfer_manager.queue_depth.high_priorityGaugeItemsCurrently waiting high-priority executions; should ideally remain low
inray.transfer_manager.queue_depth.normal_priorityGaugeItemsCurrently pending normal-priority executions
inray.transfer_manager.queue_depth.low_priorityGaugeItemsCurrently pending low-priority tasks
inray.transfer_manager.busy_worker_threadsGaugeThreadsBusy worker threads
inray.transfer_manager.ready_worker_threadsGaugeThreadsReady worker threads
inray.transfer_manager.worker_thread_utilizationGauge%Total utilization of all workers; consistently high values combined with a growing queue indicate capacity limits
inray.transfer_manager.utilization.high_priorityGauge%Percentage of processing time for high-priority transfers
inray.transfer_manager.utilization.normal_priorityGauge%Percentage of processing time spent on normal-priority transfers
inray.transfer_manager.utilization.low_priorityGauge%Percentage of processing time spent on low-priority transfers
inray.transfer_manager.average_triggers_per_secondGaugeItems/sAverage input rate to the transfer manager
inray.transfer_manager.average_processing_time_per_itemGaugemsAverage processing time per processed item
inray.transfer_manager.trigger_transfer_delayHistogrammsTime between trigger event and actual processing; important for latency analysis
inray.transfer_manager.tags_executedHistogramTagsNumber of tags processed per transfer; helps determine why a transfer is taking longer
inray.transfer_manager.default_prio_average_workloadGauge-Backpressure for normal and low priority; the higher the value, the more work could not be immediately processed
inray.transfer_manager.high_prio_average_workloadGauge-Backpressure for high priority

Typical interpretation:

  • queue_depth increases, worker_thread_utilization remains high: The router is continuously processing at capacity.
  • average_processing_time_per_item increases, and tags_executed also increases: The transfers are becoming more complex in terms of content, not just more numerous.
  • high_prio_average_workload is rising even though the normal queue is low: High-priority connections require targeted analysis.

Connections

Metrics per configured connection, dimensioned by connection name.

Useful for:

  • Identifying faulty or slow individual connections
  • Comparing individual connections in Grafana or InfluxDB
  • Triggering alerts for status changes or rising error rates

These include, among others, the following metrics:

MetricTypeUnitDescription
inray.connections.execution.countCounter-Total number of executions
inray.connections.execution.success.countCounter-Successful executions
inray.connections.execution.error.countCounter-Failed executions
inray.connections.execution.durationHistogrammsExecution duration
inray.connections.execution.type.durationHistogramµsExecution duration by result type, for example Ok, Error, or Aborted
inray.connections.stateGauge-Current connection status; the numerical values should be interpreted using the value table above
inray.connections.execution.stateGauge-Result of the last execution; useful for single-stat panels or status lights
inray.connections.total.ok.countGauge-Connections in the OK state
inray.connections.total.error.countGauge-Connections in an error state
inray.connections.total.deactivated.countGauge-Deactivated connections

Typical interpretation:

  • execution.error.count increases while execution.count also increases: The connection is active but generating errors.
  • execution.duration increases without an increased trigger load: The cause is more likely to be in the processing or the target system than in the trigger.
  • connections.state = 7: The connection is not technically disrupted but is blocked due to licensing issues.

Triggers

Metrics for asynchronous triggers, dimensioned by connection name.

Useful for:

  • Analyzing overflowing or undersized trigger queues
  • Assessing whether triggers are being generated faster than they are processed
  • Distinguishing between configuration errors and runtime bottlenecks

These include, among others, the following metrics:

MetricTypeUnitDescription
inray.connections.trigger.async.statusGauge-Status of the asynchronous trigger; the numerical values should be interpreted using the value table above
inray.connections.trigger.async.queued_eventsGauge-Currently queued trigger events that have not yet been processed
inray.connections.trigger.async.queue_limitGauge-Configured maximum size of the trigger queue
inray.connections.trigger.async.enqueue.countCounter-Total number of events enqueued
inray.connections.trigger.async.dequeue.countCounter-Total processed events
inray.connections.trigger.async.dequeue.dropped_timeoutCounter-Dropped events (timeout)
inray.connections.trigger.async.queued_per_second_avgGaugeEvents/sAverage input rate
inray.connections.trigger.async.dequeued_per_second_avgGaugeEvents/sAverage processing rate
inray.connections.trigger.async.dropped_per_second_avgGaugeEvents/sAverage drop rate

Typical interpretation:

  • queued_events is approaching queue_limit: The queue is too small or processing is too slow.
  • queued_per_second_avg is consistently higher than dequeued_per_second_avg: A backlog is building up.
  • dequeue.dropped_timeout is increasing: The connection cannot process trigger events in a timely manner.

OPC UA

OPC UA connection management metrics, dimensioned by the server address.

Useful for:

  • Monitoring the stability of OPC UA connections
  • Identifying configuration issues or unstable sessions
  • Evaluating read and subscription behavior

These include, among others, the following metrics:

MetricTypeUnitDescription
inray.opcua.connection_manager.stateGauge-Connection status of the OPC UA manager; the numerical values should be interpreted using the value table above
inray.opcua.connection_manager.connection_established_successful.countCounter-Successful connection establishment attempts
inray.opcua.connection_manager.connection_established_failed.countCounter-Failed connection attempts
inray.opcua.connection_manager.keep_alive_failed.countCounter-Keep-alive errors
inray.opcua.connection_manager.watchdog_cycle_durationHistogrammsWatchdog cycle duration
inray.opcua.group.item_countGauge-Number of subscribed items per group

Plug-ins

Metrics for the plug-in system as well as plug-in-specific metrics for individual plug-in types. These metrics are only available if the respective plug-in is active and licensed.

General Plug-in Metrics

MetricTypeUnitDescription
inray.plugins.instance.countGauge-Number of active plug-in instances
inray.plugins.instance.statusGauge-Status of a plugin instance; the numerical values should be interpreted using the value table above
inray.plugins.execution.countCounter-Total number of plugin executions
inray.plugins.execution.time.histogramHistogrammsExecution time per plugin instance
inray.plugins.total.ok.countGauge-Plugins in the OK state
inray.plugins.total.error.countGauge-Plug-ins in error state
inray.plugins.total.warning.countGauge-Plug-ins with warnings

MQTT Plug-in

MetricTypeUnitDescription
inray.mqtt.connections.activeGauge-Active MQTT connections
inray.mqtt.connect.attemptCounter-Connection attempts
inray.mqtt.connect.okCounter-Successful connections
inray.mqtt.connect.failCounter-Failed connections
inray.mqtt.publish.okCounter-Successfully published messages
inray.mqtt.publish.failCounter-Failed publishes
inray.mqtt.publish.latency.msHistogrammsPublish latency
inray.mqtt.payload.bytesHistogramBytesMessage size

.NET Runtime & Process

When system instrumentation is enabled, the OPC Router also exports standard metrics from the .NET runtime environment and the operating system process (enabled by default). These include, among other things, garbage collector statistics, thread pool utilization, and process CPU time.