OVS Metrics
Open vSwitch (OVS) with DOCA provides Prometheus-compatible metrics to monitor health and performance.
NVIDIA DOCA-accelerated Open vSwitch (OVS) offers comprehensive observability through real-time performance and health metrics. These metrics provide deep visibility into packet processing paths—both software and hardware—and are critical for monitoring, debugging, and optimizing virtual network functions (VNFs) and cloud-native workloads.
Metrics are exported in Prometheus format, making them easy to integrate with popular observability stacks such as Prometheus and Grafana. DOCA Telemetry Services (DTS) can also aggregate and forward these metrics as part of a broader telemetry pipeline.
This page outlines the available tools for accessing OVS metrics, how to configure them, and how to integrate them with Prometheus and DTS for automated monitoring and alerting.
Running ovs-exporter
The OVS metrics exporter (ovs-exporter
) is included with the OVS-DOCA package. It runs an HTTP server that can be scraped by a Prometheus instance.
Use systemd
to manage the exporter:
Managing the ovs-exporter
# Start and enable the service
systemctl start ovs-exporter
systemctl enable
ovs-exporter
# Check service status
systemctl status ovs-exporter
# Stop or disable the service
systemctl stop ovs-exporter
systemctl disable ovs-exporter
The default configuration exposes metrics on TCP port 6103
.
To modify the configuration, edit /etc/openvswitch/ovs-exporter.conf
:
Default ovs-exporter configuration
[exporter]
port = 6103
extended = no
debug = no
OVS metrics are divided into three pages:
basic
– always enabled; suitable for most usersextended
– includes additional software countersdebug
– includes experimental or low-level counters
Additional metric pages can be enabled by setting their respective options to yes
in the configuration file.
Debug
metrics are experimental and may change without notice.Basic
andextended
metrics are stable across LTS releases.Metrics scheduled for removal are marked as
deprecated
in their PrometheusHELP
description.
To retrieve metrics from the HTTP endpoint:
HTTP Metrics query
curl -s 0.0.0.0:6103
Integration with DOCA Telemetry Services
To integrate OVS metrics with DTS, configure the prometheus_aggr
DTS provider to scrape the ovs-exporter
endpoint.
For configuration details, refer to the Prometheus Aggregator section in the DOCA Telemetry Service Guide for more information.
OVS also exposes metrics directly through its control socket, without needing the ovs-exporter
service. Run:
ovs-appctl metrics/show [-x] [-d]
Use
-x
to include extended metricsUse
-d
to include debug metrics
The output format is Prometheus-compatible and printed to the terminal.
The ovs-metrics
tool provides a real-time view of hardware and software counters:
ovs-metrics
This tool requires the python3-doca-openvswitch
package. To install it:
On Ubuntu:
sudo apt install python3-doca-openvswitch
On RHEL:
sudo yum install python3-doca-openvswitch
The tool reports the following metrics every second:
sw-pkts
– number of packets passed in software (total)sw-pps
– last second packet per second in softwaresw-conns
– number of CT connections in softwaresw-cps
– last second new connections per second in softwarehw-pkts
– number of packets passed in hardware (total)hw-pps
– last second packet per second in hardwarehw-conns
– number of CT connections in hardwarehw-cps
– last second new connections per second in hardwareenqueued
– number of rules pending hardware offloadhw-rules
– number of offloaded rules in hardware (including infrastructure rules)hw-rps
– last second new hardware rules offloaded per second