Observing Open vSwitch with native prometheus metrics#
OVS + OVN 2025 Fall Conference (Prague) digest Program Adjacent pick Prague · 19–20 November 2025
Gaetan Rivet (NVIDIA)
- Why: OVS observability today depends on external exporters that assume the kernel datapath and scrape CLIs; a native exporter unifies kernel and userspace observability with lower footprint — practical for anyone running OVS at scale.
- What: A Prometheus-compatible metrics framework inside the OVS library: counter/gauge/histogram types, and a per-process metrics tree whose internal nodes mirror module structure (datapath cache/conntrack/offloads, interfaces, memory, ofproto). Node types cover subsystems, labeled collections (FOREACH), bounded collections for label generation, and conditionals (e.g., offload metrics only when
hw-offloadis on). Exposed via anovs-exportersystemd service (default port 6103),ovs-appctl metrics/show, and Python bindings; new metrics appear automatically without new CLI plumbing. - How: The tree is statically defined (API in
lib/metrics.h), interpreted at scrape time, and rendered into the Prometheus text model — the design is deliberately output-format-agnostic so other formats could follow. - Where applicable: OVS kernel and userspace datapaths alike; initial coverage: resource consumption, interface counters and link state, ofproto upcalls/revalidation, and coverage counters. Complements (rather than competes with) DOCA-Telemetry on NVIDIA kit.
