{"id":16248217,"url":"https://github.com/rmohr/ovirt-prometheus-bridge","last_synced_at":"2025-07-28T19:33:26.030Z","repository":{"id":64304555,"uuid":"54574719","full_name":"rmohr/ovirt-prometheus-bridge","owner":"rmohr","description":"oVirt Engine host autodiscovery service for Prometheus targets","archived":false,"fork":false,"pushed_at":"2016-04-14T13:22:22.000Z","size":32,"stargazers_count":5,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T20:39:49.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmohr.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}},"created_at":"2016-03-23T16:15:15.000Z","updated_at":"2020-11-04T05:09:10.000Z","dependencies_parsed_at":"2023-01-15T10:15:50.980Z","dependency_job_id":null,"html_url":"https://github.com/rmohr/ovirt-prometheus-bridge","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmohr%2Fovirt-prometheus-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmohr%2Fovirt-prometheus-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmohr%2Fovirt-prometheus-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmohr%2Fovirt-prometheus-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmohr","download_url":"https://codeload.github.com/rmohr/ovirt-prometheus-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014176,"owners_count":20383715,"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":[],"created_at":"2024-10-10T14:40:50.046Z","updated_at":"2025-03-19T19:31:52.545Z","avatar_url":"https://github.com/rmohr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ovirt-prometheus-bridge\n\n`ovirt-prometheus-bridge` is a host autodiscovery service for Prometheus\ntargets. It can be used to query oVirt Engine for hosts. The result is stored\nin a json file which Prometheus can use to find scrape targets. Prometheus will\nthen start collecting metrics from all hosts in your virtual datacenter where\n[vdsm-prometheus](https://github.com/rmohr/vdsm-prometheus) is installed.\n\n[![Build Status](https://travis-ci.org/rmohr/ovirt-prometheus-bridge.svg?branch=master)](https://travis-ci.org/rmohr/ovirt-prometheus-bridge)\n\nIn this example\n```bash\ndocker run -e ENGINE_PASSWORD=engine -v $PWD:/targets rmohr/ovirt-prometheus-bridge -update-interval 60 -no-verify -engine-url=https://localhost:8443 -output /targets/targets.json\n```\nthe service is querying the oVirt Engine API every 60 seconds and writes the\nfound hosts into the file `targets.json`.  The created file `targets.json`\nlooks like this:\n\n```json\n[\n  {\n    \"targets\": [\n      \"192.168.122.190:8181\",\n      \"192.168.122.41:8181\"\n    ],\n    \"labels\": {\n      \"cluster\": \"0294d770-70c0-4b99-a527-f8a4ff4de436\"\n    }\n  }\n]\n```\n\nPrometheus can monitor files like this and update its configuration whenever\nthis file changes.  Here is a sample configuration for prometheus:\n\n```yaml\nglobal:\n  scrape_interval: 15s\n\n  external_labels:\n    monitor: 'ovirt'\n\nscrape_configs:\n  - job_name: 'prometheus'\n\n    scrape_interval: 10s\n\n    target_groups:\n      - targets: ['localhost:9090']\n        labels:\n          group: 'prometheus'\n\n  - job_name: 'vdsm'\n\n    scrape_interval: 5s\n    file_sd_configs:\n      - names : ['/targets/*.json']\n```\n\nHere is another example Prometheus config which uses TLS to communicate with\n[vdsm-prometheus](https://github.com/rmohr/vdsm-prometheus):\n\n```yaml\nglobal:\n  scrape_interval: 15s\n\n  external_labels:\n    monitor: 'ovirt'\n\nscrape_configs:\n  - job_name: 'prometheus'\n\n    scrape_interval: 10s\n\n    target_groups:\n      - targets: ['localhost:9090']\n        labels:\n          group: 'prometheus'\n\n  - job_name: 'vdsm'\n\n    scheme: 'https'\n    tls_config:\n      ca_file: '/etc/pki/prom/certs/cacert.pem'\n      cert_file: '/etc/pki/prom/certs/promcert.pem'\n      key_file: '/etc/pki/prom/certs/promkey.pem'\n      insecure_skip_verify: false\n    scrape_interval: 5s\n    file_sd_configs:\n      - names : ['/targets/*.json']\n```\n\n# Quick start\n\nTo quickly spawn ovirt-prometheus-bridge, Prometheus and Grafana you can use\nthe Docker compose file in this repository:\n\n```bash\nexport ENGINE_HOST=https://$ENGINE_FQDN\nexport ENGINE_PASSWORD=$OVIRT_ENGINE_PASSWORD\ndocker-compose up\n```\n\nThen add the Prometheus datasource to Grafana:\n\n```bash\ncurl -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" --data '{ \"name\":\"oVirt\", \"type\":\"prometheus\", \"url\":\"http://prometheus:9090\", \"access\":\"proxy\", \"basicAuth\":false }' http://admin:admin@localhost:3000/api/datasources\n```\n\nPrometheus will then listen on [localhost:9090](http://localhost:9090), Grafana\non [localhost:3000](http://localhost:3000) and ovirt-prometheus-bridge will\nprovide the scrape targets. The default credentials for Grafana are\n`admin:admin`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmohr%2Fovirt-prometheus-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmohr%2Fovirt-prometheus-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmohr%2Fovirt-prometheus-bridge/lists"}