{"id":13581986,"url":"https://github.com/greenpau/ovs_exporter","last_synced_at":"2025-03-22T12:32:24.955Z","repository":{"id":49445002,"uuid":"155290339","full_name":"greenpau/ovs_exporter","owner":"greenpau","description":"Prometheus Exporter for Open Virtual Switch (OVS) ","archived":false,"fork":false,"pushed_at":"2024-01-22T17:08:10.000Z","size":80,"stargazers_count":23,"open_issues_count":5,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-23T01:32:12.750Z","etag":null,"topics":["openvswitch","ovs","ovsdb","prometheus-client","prometheus-client-library","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"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/greenpau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-29T22:35:10.000Z","updated_at":"2024-04-30T16:43:58.000Z","dependencies_parsed_at":"2024-01-29T08:10:42.430Z","dependency_job_id":"550e0c1b-f186-4b2c-917d-57cee46c408a","html_url":"https://github.com/greenpau/ovs_exporter","commit_stats":{"total_commits":38,"total_committers":5,"mean_commits":7.6,"dds":0.1578947368421053,"last_synced_commit":"2ceae2467ba1dd12a34def7d26e5927bb3e684c6"},"previous_names":["ovnworks/ovs_exporter"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fovs_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fovs_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fovs_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fovs_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greenpau","download_url":"https://codeload.github.com/greenpau/ovs_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244207736,"owners_count":20416107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["openvswitch","ovs","ovsdb","prometheus-client","prometheus-client-library","prometheus-exporter"],"created_at":"2024-08-01T15:02:22.007Z","updated_at":"2025-03-22T12:32:24.676Z","avatar_url":"https://github.com/greenpau.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Open Virtual Switch (OVS) Exporter\n\n\u003ca href=\"https://github.com/greenpau/ovs_exporter/actions/\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/greenpau/ovs_exporter/workflows/build/badge.svg?branch=main\"\u003e\u003c/a\u003e\n\nExport Open Virtual Switch (OVS) data to Prometheus.\n\n## Introduction\n\nThis exporter exports metrics from the following OVS components:\n* OVS `vswitchd` service\n* `Open_vSwitch` database\n* OVN `ovn-controller` service\n\n## Getting Started\n\nRun the following commands to install it:\n\n```bash\nwget https://github.com/greenpau/ovs_exporter/releases/download/v1.0.4/ovs-exporter-1.0.4.linux-amd64.tar.gz\ntar xvzf ovs-exporter-1.0.4.linux-amd64.tar.gz\ncd ovs-exporter*\n./install.sh\ncd ..\nrm -rf ovs-exporter-1.0.4.linux-amd64*\nsystemctl status ovs-exporter -l\ncurl -s localhost:9475/metrics | grep server_id\n```\n\nRun the following commands to build and test it:\n\n```bash\ncd $GOPATH/src\nmkdir -p github.com/greenpau\ncd github.com/greenpau\ngit clone https://github.com/greenpau/ovs_exporter.git\ncd ovs_exporter\nmake\nmake qtest\n```\n\n## Exported Metrics\n\n| Metric | Meaning | Labels |\n| ------ | ------- | ------ |\n| `ovs_up` |  Is OVS stack up (1) or is it down (0). | `system_id` |\n\nFor example:\n\n```bash\n$ curl localhost:9475/metrics | grep ovn\n# HELP ovs_up Is OVS stack up (1) or is it down (0).\n# TYPE ovs_up gauge\novs_up 1\n```\n\n## Flags\n\n```bash\n./bin/ovs-exporter --help\n```\n\n## Development Notes\n\nRun the following command to build `arm64`:\n\n```bash\nmake BUILD_OS=\"linux\" BUILD_ARCH=\"arm64\"\n```\n\nNext, package the binary:\n\n```bash\nmake BUILD_OS=\"linux\" BUILD_ARCH=\"arm64\" dist\n```\n\nAfter a successful release, upload packages to Github:\n\n```bash\nowner=$(cat .git/config  | egrep \"^\\s+url\" | cut -d\":\" -f2 | cut -d\"/\" -f1)\nrepo=$(cat .git/config  | egrep \"^\\s+url\" | cut -d\":\" -f2 | cut -d\"/\" -f2 | sed 's/.git$//')\ntag=\"v$(\u003c VERSION)\"\ngithub_api_token=\"PASTE_TOKEN_HERE\"\nfilename=\"./dist/${repo}-$(\u003c VERSION).linux-amd64.tar.gz\"\nupload-github-release-asset.sh github_api_token=${github_api_token} owner=${owner} repo=${repo} tag=${tag} filename=dist/ovs-exporter-$(\u003c VERSION).linux-amd64.tar.gz\nupload-github-release-asset.sh github_api_token=${github_api_token} owner=${owner} repo=${repo} tag=${tag} filename=dist/ovs-exporter-$(\u003c VERSION).linux-arm64.tar.gz\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenpau%2Fovs_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreenpau%2Fovs_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenpau%2Fovs_exporter/lists"}