Skip to main content
Version: 5.5

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. 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 InfluxDB export
EndpointURL of the InfluxDB instance, e.g., http://localhost:8086
OrganizationInfluxDB organization
BucketDestination 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, ...)Enabled
ProcessProcess metrics (CPU time, memory)Enabled
ASP.NET CoreHTTP server metricsDisabled
HTTP ClientMetrics for outbound HTTP requestsInactive
Event CountersWindows Event Counter sourcesInactive

How to Read 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 valuesLatencies, 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, plugin, 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 numerical values. A fixed value table should therefore be used for dashboards and alerts.

inray.service.escalation_level

Describes the global health status of the OPC router.

ValueMeaningPractical interpretation
-2UndefinedState cannot yet be determined
-1InitializingService is still initializing internal components
0EscalationLevel0Normal operation
1EscalationLevel1Good, frequently repeated transfer values are partially discarded
2EscalationLevel2Good transfer values are discarded
3EscalationLevel3Transfer values are completely discarded
4EscalationLevel4Messages with normal priority 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 participating plug-in
7NoLicenseLicense is missing or invalid
8ShutDownConnection is being terminated or has shut down
9StandByConnection is inactive but still exists

inray.connections.execution.state

Describes the result of the last executed connection.

ValueMeaningPractical Interpretation
0NoneNo execution or result available yet
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 yet
1OkTrigger is working properly
2StatusErrorTrigger reports a status error
3CheckErrorTrigger check failed
4ConfigErrorTrigger is configured incorrectly

inray.plugins.instance.status

Describes the state of a plugin instance.

ValueMeaningPractical Interpretation
0UninitializedPlugin has not yet been initialized
1InitializingPlugin is starting up or initializing resources
2OkPlugin is working properly
3WarningPlugin is running but reporting warnings
4ErrorPlugin is faulty
5StoppedPlugin is stopped
6NoLicensePlugin 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 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 only exported if the respective plugin is licensed and active. Which metrics are actually provided depends on the configuration and runtime status of the OPC Router.

Service & System

General status metrics of the OPC Router service and the host system.

Useful for:

  • Monitoring the overall status of the service
  • Identifying CPU, memory, or disk space bottlenecks
  • Alerts for critical operating conditions

Includes the following metrics, among others:

MetricTypeUnitDescription
inray.service.escalation_levelGauge-Global health status of the OPC router; the numerical values should be interpreted using the table above
inray.service.used_memory_bytesGaugeBytesMemory usage of the process
inray.system.processor_usageGauge%CPU usage of the host system
inray.system.memory_usageGauge%Memory usage of the host system
inray.system.free_memory_bytesGaugeBytesAvailable memory
inray.drives.{drive}.free_bytesGaugeBytesFree disk 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

Recalculating 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 load 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 per 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 of 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 CPU utilization of the host, but rather the utilization of the transfer workers over time.
  • The gauge is an averaged trend, not a current 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 the following metrics, among others:

MetricTypeUnitDescription
inray.transfer_manager.queue_depthGaugeItemsNumber of currently waiting transfer executions across all priorities; a continuously rising value indicates a backlog
inray.transfer_manager.queue_depth.high_priorityGaugeItemsCurrently waiting high-priority executions; should preferably remain low
inray.transfer_manager.queue_depth.normal_priorityGaugeItemsCurrently waiting normal-priority executions
inray.transfer_manager.queue_depth.low_priorityGaugeItemsCurrently waiting low-priority executions
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 worker threads; 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 for normal-priority transfers
inray.transfer_manager.utilization.low_priorityGauge%Percentage of processing time for 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 processed tags per transfer; helps determine why a transfer takes longer
inray.transfer_manager.default_prio_average_workloadGauge-Backpressure for normal and low priority; the higher the value, the more work could not be taken on immediately
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, tags_executed also increases: Transfers are becoming more complex in terms of content, not just more numerous.
  • high_prio_average_workload increases 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
  • Alerts for status changes or rising error rates

Includes the following metrics, among others:

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 per 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 the 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 lies more 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.

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

Includes the following metrics, among others:

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 time.

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

Includes the following metrics, among others:

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 plugin 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 OK state
inray.plugins.total.error.countGauge-Plugins in error state
inray.plugins.total.warning.countGauge-Plugins 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 publications
inray.mqtt.publish.latency.msHistogrammsPublish latency
inray.mqtt.payload.bytesHistogramBytesMessage size

.NET Runtime & Process

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