Name: openvswitch_exporter
Owner: DigitalOcean
Description: Command openvswitch_exporter implements a Prometheus exporter for Open vSwitch.
Created: 2018-05-07 19:42:35.0
Updated: 2018-05-17 19:32:38.0
Pushed: 2018-05-17 19:32:41.0
Homepage: null
Size: 2421
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Command openvswitch_exporter
implements a Prometheus exporter for Open
vSwitch. Apache 2.0 licensed.
Available flags for openvswitch_exporter
include:
openvswitch_exporter -h
e of ./openvswitch_exporter:
etrics.addr string
address for Open vSwitch exporter (default ":9310")
etrics.path string
URL path for surfacing collected metrics (default "/metrics")
openvswitch_exporter
currently exposes a variety of metrics related to the
Linux kernel Open vSwitch datapath, using the generic netlink ovs_datapath
family.
The exported metrics are similar to those found in ovs-dpctl show
:
rvisor $ ovs-dpctl show | head -n 4
em@ovs-system:
lookups: hit:111615762 missed:1312004 lost:0
flows: 12
masks: hit:151608278 total:8 hit/pkt:1.34
To see the metrics that are currently available, use curl
:
rvisor $ curl -s http://localhost:9310/metrics | grep openvswitch
LP openvswitch_datapath_megaflow_stats_mask_hits_total Number of megaflow masks used for flow lookups.
PE openvswitch_datapath_megaflow_stats_mask_hits_total counter
vswitch_datapath_megaflow_stats_mask_hits_total{datapath="ovs-system"} 1.51606216e+08
LP openvswitch_datapath_megaflow_stats_masks_total Number of megaflow masks present.
PE openvswitch_datapath_megaflow_stats_masks_total counter
vswitch_datapath_megaflow_stats_masks_total{datapath="ovs-system"} 9
LP openvswitch_datapath_stats_flows Number of flows present.
PE openvswitch_datapath_stats_flows gauge
vswitch_datapath_stats_flows{datapath="ovs-system"} 21
LP openvswitch_datapath_stats_hits_total Number of flow table matches.
PE openvswitch_datapath_stats_hits_total counter
vswitch_datapath_stats_hits_total{datapath="ovs-system"} 1.11614549e+08
LP openvswitch_datapath_stats_lost_total Number of flow table misses not sent to userspace.
PE openvswitch_datapath_stats_lost_total counter
vswitch_datapath_stats_lost_total{datapath="ovs-system"} 0
LP openvswitch_datapath_stats_misses_total Number of flow table misses.
PE openvswitch_datapath_stats_misses_total counter
vswitch_datapath_stats_misses_total{datapath="ovs-system"} 1.311983e+06
To calculate the “hit/pkt” metric from ovs-dpctl show
(average number of masks
visited per packet), you can use the following PromQL query:
vswitch_datapath_megaflow_stats_mask_hits_total / (openvswitch_datapath_stats_hits_total + openvswitch_datapath_stats_misses_total)