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.
Debugmetrics are experimental and may change without notice.Basicandextendedmetrics are stable across LTS releases.Metrics scheduled for removal are marked as
deprecatedin their PrometheusHELPdescription.
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
-xto include extended metricsUse
-dto 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
OVS allows users to register human-readable names for flow cookies. This capability exposes per-flow counters via ovs-metrics, which can then be accessed and monitored through DTS.
Management Commands
The following ovs-appctl commands are used to manage flow metric registrations.
Register or Update Metric
Associates a name with a flow cookie. If the cookie is already registered, this command updates the associated name (renames it).
ovs-appctl ofproto/flow-metric-add <bridge> <cookie> <name>
Remove Metric
Deletes the mapping for a specific cookie.
ovs-appctl ofproto/flow-metric-del <bridge> <cookie>
List Metrics
Displays all currently registered flow metrics.
ovs-appctl ofproto/flow-metric-list
Parameters
Parameter | Description | Format / Constraints |
| The name of the existing OVS bridge. | Example: |
| The flow identifier. | Hexadecimal value prefixed with |
| The human-readable identifier for the flow. | Must match the pattern (e.g., |
Operational Behavior
Metric registration is local to the specified bridge. A name is associated with a cookie only within that bridge's context.
Counters are aggregated (summed) across all OpenFlow rules in the bridge that share the same registered cookie.
A metric entry is automatically removed from the system only when the last OpenFlow entry utilizing that specific cookie is removed from the bridge.