Giter Site home page Giter Site logo

usabilla / openvswitch_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digitalocean/openvswitch_exporter

0.0 2.0 0.0 2.13 MB

Command openvswitch_exporter implements a Prometheus exporter for Open vSwitch.

License: Other

Shell 3.33% Go 96.67%

openvswitch_exporter's Introduction

openvswitch_exporter Build Status Go Report Card

Command openvswitch_exporter implements a Prometheus exporter for Open vSwitch. Apache 2.0 licensed.

Usage

Available flags for openvswitch_exporter include:

$ ./openvswitch_exporter -h
Usage of ./openvswitch_exporter:
  -metrics.addr string
        address for Open vSwitch exporter (default ":9310")
  -metrics.path string
        URL path for surfacing collected metrics (default "/metrics")

Overview

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:

hypervisor $ ovs-dpctl show | head -n 4
system@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:

hypervisor $ curl -s http://localhost:9310/metrics | grep openvswitch
# HELP openvswitch_datapath_megaflow_stats_mask_hits_total Number of megaflow masks used for flow lookups.
# TYPE openvswitch_datapath_megaflow_stats_mask_hits_total counter
openvswitch_datapath_megaflow_stats_mask_hits_total{datapath="ovs-system"} 1.51606216e+08
# HELP openvswitch_datapath_megaflow_stats_masks Number of megaflow masks present.
# TYPE openvswitch_datapath_megaflow_stats_masks counter
openvswitch_datapath_megaflow_stats_masks{datapath="ovs-system"} 9
# HELP openvswitch_datapath_stats_flows Number of flows present.
# TYPE openvswitch_datapath_stats_flows gauge
openvswitch_datapath_stats_flows{datapath="ovs-system"} 21
# HELP openvswitch_datapath_stats_hits_total Number of flow table matches.
# TYPE openvswitch_datapath_stats_hits_total counter
openvswitch_datapath_stats_hits_total{datapath="ovs-system"} 1.11614549e+08
# HELP openvswitch_datapath_stats_lost_total Number of flow table misses not sent to userspace.
# TYPE openvswitch_datapath_stats_lost_total counter
openvswitch_datapath_stats_lost_total{datapath="ovs-system"} 0
# HELP openvswitch_datapath_stats_misses_total Number of flow table misses.
# TYPE openvswitch_datapath_stats_misses_total counter
openvswitch_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:

openvswitch_datapath_megaflow_stats_mask_hits_total / (openvswitch_datapath_stats_hits_total + openvswitch_datapath_stats_misses_total)

openvswitch_exporter's People

Contributors

mdlayher avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.