DOCA Documentation v3.2.0

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

Copy
Copied!
            

# 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

Copy
Copied!
            

[exporter] port = 6103 extended = no debug = no

OVS metrics are divided into three pages:

  • basic – always enabled; suitable for most users

  • extended – includes additional software counters

  • debug – 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 and extended metrics are stable across LTS releases.

  • Metrics scheduled for removal are marked as deprecated in their Prometheus HELP description.

To retrieve metrics from the HTTP endpoint:

HTTP Metrics query

Copy
Copied!
            

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:

Copy
Copied!
            

ovs-appctl metrics/show [-x] [-d]

  • Use -x to include extended metrics

  • Use -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:

Copy
Copied!
            

ovs-metrics

Note

This tool requires the python3-doca-openvswitch package. To install it:

  • On Ubuntu:

    Copy
    Copied!
                

    sudo apt install python3-doca-openvswitch

  • On RHEL:

    Copy
    Copied!
                

    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 software

  • sw-conns – number of CT connections in software

  • sw-cps – last second new connections per second in software

  • hw-pkts – number of packets passed in hardware (total)

  • hw-pps – last second packet per second in hardware

  • hw-conns – number of CT connections in hardware

  • hw-cps – last second new connections per second in hardware

  • enqueued – number of rules pending hardware offload

  • hw-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).

Copy
Copied!
            

ovs-appctl ofproto/flow-metric-add <bridge> <cookie> <name>


Remove Metric

Deletes the mapping for a specific cookie.

Copy
Copied!
            

ovs-appctl ofproto/flow-metric-del <bridge> <cookie>


List Metrics

Displays all currently registered flow metrics.

Copy
Copied!
            

ovs-appctl ofproto/flow-metric-list

Parameters

Parameter

Description

Format / Constraints

bridge

The name of the existing OVS bridge.

Example: br0

cookie

The flow identifier.

Hexadecimal value prefixed with 0x (e.g., 0x1234).

name

The human-readable identifier for the flow.

Must match the pattern [A-Za-z][_A-Za-z0-9]*

(e.g., failover_counter).


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.

© Copyright 2025, NVIDIA. Last updated on Nov 20, 2025