{"id":51307936,"url":"https://github.com/barnes-c/ovs-exporter","last_synced_at":"2026-07-01T01:05:44.235Z","repository":{"id":364389318,"uuid":"1261452889","full_name":"barnes-c/ovs-exporter","owner":"barnes-c","description":"OTel-native Prometheus exporter for Open vSwitch (OVS)","archived":false,"fork":false,"pushed_at":"2026-06-23T21:14:24.000Z","size":242,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-23T23:10:42.866Z","etag":null,"topics":["deb","logs","metrics","opentelemetry","openvswitch","ovn","ovs","prometheus","rpm","sbom","traces"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barnes-c.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T17:50:20.000Z","updated_at":"2026-06-15T16:56:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/barnes-c/ovs-exporter","commit_stats":null,"previous_names":["barnes-c/ovs-exporter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/barnes-c/ovs-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnes-c%2Fovs-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnes-c%2Fovs-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnes-c%2Fovs-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnes-c%2Fovs-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barnes-c","download_url":"https://codeload.github.com/barnes-c/ovs-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnes-c%2Fovs-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34988751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deb","logs","metrics","opentelemetry","openvswitch","ovn","ovs","prometheus","rpm","sbom","traces"],"created_at":"2026-07-01T01:05:43.710Z","updated_at":"2026-07-01T01:05:44.219Z","avatar_url":"https://github.com/barnes-c.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OVS Exporter\n\n[![GitHub Release](https://img.shields.io/github/v/release/barnes-c/ovs-exporter)](https://github.com/barnes-c/ovs-exporter/releases/latest)\n[![Build Status](https://github.com/barnes-c/ovs-exporter/actions/workflows/ci.yml/badge.svg)](https://github.com/barnes-c/ovs-exporter/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/barnes-c/ovs-exporter)](https://goreportcard.com/report/github.com/barnes-c/ovs-exporter)\n[![GHCR](https://img.shields.io/badge/ghcr.io-barnes--c%2Fovs--exporter-blue?logo=github)](https://github.com/barnes-c/ovs-exporter/pkgs/container/ovs-exporter)\n[![Docker Hub](https://img.shields.io/docker/pulls/barnesbiz/ovs-exporter?logo=docker)](https://hub.docker.com/r/barnesbiz/ovs-exporter)\n\nOTel-native Prometheus exporter for [Open vSwitch (OVS)](https://www.openvswitch.org/).\n\nListens on port **10054** by default. Scrapes data from `ovsdb` (via libovsdb) and `ovs-vswitchd` (via the unixctl socket), exposes metrics at `/metrics`, and can additionally push metrics, traces, and logs to an OTLP endpoint.\n\nIf this project is useful to you, a star on the repo would be appreciated.\n\n## Quick start\n\nDocker (mount the OVS sockets read-only):\n\n```sh\ndocker run --rm -p 10054:10054 \\\n  -v /var/run/openvswitch:/var/run/openvswitch:ro \\\n  ghcr.io/barnes-c/ovs-exporter:latest\n```\n\nBinary:\n\n```sh\nmake build\n./ovs-exporter --ovs.db-socket=unix:/var/run/openvswitch/db.sock\n```\n\nScrape: `curl localhost:10054/metrics`. Probes: `/healthz`, `/readyz`.\n\nSee [`examples/`](examples/) for systemd, Kubernetes DaemonSet + ServiceMonitor, and OTel Collector configs.\n\n## Configuration\n\nKey flags (full list via `--help`):\n\n|          Flag          |               Default               |                Purpose                 |\n| ---------------------- | ----------------------------------- | -------------------------------------- |\n| `--web.listen-address` | `:10054`                            | Listen address                         |\n| `--web.telemetry-path` | `/metrics`                          | Prometheus endpoint                    |\n| `--web.prometheus`     | `true`                              | Disable for OTLP-push-only deployments |\n| `--ovs.db-socket`      | `unix:/var/run/openvswitch/db.sock` | libovsdb endpoint                      |\n| `--ovs.run-dir`        | `/var/run/openvswitch`              | unixctl socket directory               |\n| `--cache.ttl`          | `60s`                               | unixctl scrape interval                |\n\n### OTel pipeline\n\nThe OTel pipeline is entirely environment-driven; see the [OTel SDK env var spec](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) for the full list. `/metrics` is always served unless `--web.prometheus=false`.\n\n|           Variable            |                                  Purpose                                   |\n| ----------------------------- | -------------------------------------------------------------------------- |\n| `OTEL_METRICS_EXPORTER`       | Comma-separated push exporters: `otlp`, `console`, `none` (default `none`) |\n| `OTEL_TRACES_EXPORTER`        | Traces exporter: `otlp`, `console`, `none` (default `none`)                |\n| `OTEL_LOGS_EXPORTER`          | Logs exporter: `otlp`, `console`, `none` (default `none`)                  |\n| `OTEL_EXPORTER_OTLP_ENDPOINT` | Collector endpoint, e.g. `localhost:4317`                                  |\n| `OTEL_EXPORTER_OTLP_PROTOCOL` | `grpc` or `http/protobuf`                                                  |\n| `OTEL_METRIC_EXPORT_INTERVAL` | OTLP metric push interval, in ms                                           |\n| `OTEL_TRACES_SAMPLER`         | e.g. `parentbased_traceidratio`                                            |\n| `OTEL_TRACES_SAMPLER_ARG`     | Sampler argument (e.g. `0.1`)                                              |\n| `OTEL_SERVICE_NAME`           | Resource `service.name` (default `ovs-exporter`)                           |\n| `OTEL_CONFIG_FILE`            | Path to `otelconf` YAML; overrides all other `OTEL_*` vars                 |\n\nThe three exporter selectors default to `none` instead of the spec default `otlp`. The OTel exporters stays silent until OTLP is opted in.\n\nTraces cover the scrape pipeline (`ovsdb`, `unixctl-ovs`, HTTP handler). Logs are emitted via the OTel logs SDK when an exporter is set.\n\n## Metrics\n\nAll instruments use the OTel-spec naming convention (`ovs.\u003carea\u003e.\u003cname\u003e`).\n\n|                                Metric                                |  Type   | Source  |\n| -------------------------------------------------------------------- | ------- | ------- |\n| `ovs.bridge.ports.count`                                             | gauge   | ovsdb   |\n| `ovs.bridges.count`                                                  | gauge   | ovsdb   |\n| `ovs.coverage.events`                                                | counter | unixctl |\n| `ovs.datapath.cache.hit`                                             | counter | unixctl |\n| `ovs.datapath.flows`                                                 | gauge   | unixctl |\n| `ovs.datapath.interface.info`                                        | gauge   | unixctl |\n| `ovs.datapath.lookups`                                               | counter | unixctl |\n| `ovs.datapath.masks.hit`                                             | counter | unixctl |\n| `ovs.interface.{errors,drops,collisions}`                            | counter | ovsdb   |\n| `ovs.interface.{rx,tx}.{bytes,packets}`                              | counter | ovsdb   |\n| `ovs.interface.admin_state`                                          | gauge   | ovsdb   |\n| `ovs.interface.external_ids`                                         | gauge   | ovsdb   |\n| `ovs.interface.if_index`                                             | gauge   | ovsdb   |\n| `ovs.interface.info`                                                 | gauge   | ovsdb   |\n| `ovs.interface.ingress_policing.{rate,burst,kpkts_rate,kpkts_burst}` | gauge   | ovsdb   |\n| `ovs.interface.link_speed`                                           | gauge   | ovsdb   |\n| `ovs.interface.link_state`                                           | gauge   | ovsdb   |\n| `ovs.interface.mtu`                                                  | gauge   | ovsdb   |\n| `ovs.interface.of_port`                                              | gauge   | ovsdb   |\n| `ovs.interface.options`                                              | gauge   | ovsdb   |\n| `ovs.interface.status`                                               | gauge   | ovsdb   |\n| `ovs.memory.usage`                                                   | gauge   | unixctl |\n| `ovs.ports.count`                                                    | gauge   | ovsdb   |\n| `ovs.upcall.dump.duration`                                           | gauge   | unixctl |\n| `ovs.upcall.flows.{current,max,limit}`                               | gauge   | unixctl |\n| `ovs.upcall.handler.keys`                                            | gauge   | unixctl |\n\nSee [`collector/`](collector/) for the per-collector implementation.\n\n## Development\n\n```sh\nmake all              # fmt, vet, lint, build, test\nmake test             # go test -race ./...\nmake test-integration # smoke stack + integration tests (podman/docker)\nmake snapshot         # local goreleaser build\n```\n\n## License\n\n[Apache-2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarnes-c%2Fovs-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarnes-c%2Fovs-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarnes-c%2Fovs-exporter/lists"}