Prometheus exporter for port metrics.written in Go with pluggable metric collectors.
There is varying support for collectors on each operating system. The tables below list all existing collectors and the supported systems.
Name | Description | OS |
---|---|---|
ovs_db | Exposes ovs ports statistics from ovsdb. | Linux |
container_interface | Exposes container interfaces state from container . |
Linux |
Name | Description | OS |
---|
-
Go compiler or Docker
-
RHEL/CentOS:
glibc-static
package.
go get github.com/liucimin/port-exporter
cd ${GOPATH-$HOME/go}/src/github.com/liucimin/port-exporter
make
./port_exporter <flags>
To see all available configuration flags:
./port_exporter -h
go get github.com/liucimin/port-exporter
cd ${GOPATH-$HOME/go}/src/github.com/liucimin/port-exporter
make docker-build
docker run -it --pid="host" --network="host" --security-opt seccomp=unconfined --privileged -v /var/run/:/var/run/ port-exporter:1.0 sh
./port_exporter --v=5 --logtostderr=true
Then we can get the metrics from the port_exporter:
curl container:9103/metrics
make test