Skip to content

Prometheus Exporter for Open Virtual Switch (OVS)

License

Notifications You must be signed in to change notification settings

syseleven/ovs_exporter

This branch is 2 commits ahead of Dmitry-Eremeev/ovs_exporter:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Piotr Misiak
Mar 11, 2025
fd705c7 · Mar 11, 2025

History

52 Commits
Sep 5, 2023
Oct 31, 2018
Mar 11, 2025
Dec 17, 2024
Mar 11, 2025
Dec 2, 2020
Dec 11, 2024
Oct 31, 2018
Dec 11, 2024
Mar 11, 2025
Mar 11, 2025
Dec 17, 2024
Mar 11, 2025
Mar 11, 2025

Repository files navigation

Open Virtual Switch (OVS) Exporter

Export Open Virtual Switch (OVS) data to Prometheus.

Introduction

This exporter exports metrics from the following OVS components:

  • OVS vswitchd service
  • Open_vSwitch database
  • OVN ovn-controller service

Getting Started

Run the following commands to build and test it:

git clone https://github.com/syseleven/ovs_exporter.git
cd ovs_exporter
make
make qtest

TLS and basic authentication

The OVS Exporter supports TLS and basic authentication.

To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository.

Exported Metrics

Metric Meaning Labels
ovs_up Is OVS stack up (1) or is it down (0). system_id

For example:

$ curl localhost:9475/metrics | grep ovn
# HELP ovs_up Is OVS stack up (1) or is it down (0).
# TYPE ovs_up gauge
ovs_up 1

Flags

./bin/ovs-exporter --help

Development Notes

Run the following command to build arm64:

make BUILD_OS="linux" BUILD_ARCH="arm64"

Next, package the binary:

make BUILD_OS="linux" BUILD_ARCH="arm64" dist

After a successful release, upload packages to Github:

owner=$(cat .git/config  | egrep "^\s+url" | cut -d":" -f2 | cut -d"/" -f1)
repo=$(cat .git/config  | egrep "^\s+url" | cut -d":" -f2 | cut -d"/" -f2 | sed 's/.git$//')
tag="v$(< VERSION)"
github_api_token="PASTE_TOKEN_HERE"
filename="./dist/${repo}-$(< VERSION).linux-amd64.tar.gz"
upload-github-release-asset.sh github_api_token=${github_api_token} owner=${owner} repo=${repo} tag=${tag} filename=dist/ovs-exporter-$(< VERSION).linux-amd64.tar.gz
upload-github-release-asset.sh github_api_token=${github_api_token} owner=${owner} repo=${repo} tag=${tag} filename=dist/ovs-exporter-$(< VERSION).linux-arm64.tar.gz

About

Prometheus Exporter for Open Virtual Switch (OVS)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 88.6%
  • Makefile 8.3%
  • Shell 3.1%