oe
github.com/greenpau/ovs_exporter
go get github.com/greenpau/ovs_exporter
oe

github.com/greenpau/ovs_exporter

Prometheus Exporter for Open Virtual Switch (OVS)

by Paul Greenberg

v1.0.2 (see all)License:Apache-2.0
go get github.com/greenpau/ovs_exporter
Readme

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 install it:

wget https://github.com/greenpau/ovs_exporter/releases/download/v1.0.0/ovs-exporter-1.0.0.linux-amd64.tar.gz
tar xvzf ovs-exporter-1.0.0.linux-amd64.tar.gz
cd ovs-exporter*
./install.sh
cd ..
rm -rf ovs-exporter-1.0.0.linux-amd64*
systemctl status ovs-exporter -l
curl -s localhost:9475/metrics | grep server_id

Run the following commands to build and test it:

cd $GOPATH/src
mkdir -p github.com/greenpau
cd github.com/greenpau
git clone https://github.com/greenpau/ovs_exporter.git
cd ovs_exporter
make
make qtest

Exported Metrics

MetricMeaningLabels
ovs_upIs 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

GitHub Stars

11

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
v1.0.3-0.20201202160101-30abef024a45
1yr ago
v1.0.2
1yr ago
No alternatives found
No tutorials found
Add a tutorial