{"id":18918175,"url":"https://github.com/perfectmemory/openshift-haproxy-exporter","last_synced_at":"2026-02-14T16:32:56.091Z","repository":{"id":142858278,"uuid":"101391703","full_name":"PerfectMemory/openshift-haproxy-exporter","owner":"PerfectMemory","description":"Wraps the prom/haproxy-exporter docker image to integrate with the Openshift3 router","archived":false,"fork":false,"pushed_at":"2017-08-25T10:16:09.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-23T19:53:37.572Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerfectMemory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-25T10:03:49.000Z","updated_at":"2017-08-25T10:03:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"52d1ea2c-9641-4e79-9de3-155e781906ec","html_url":"https://github.com/PerfectMemory/openshift-haproxy-exporter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PerfectMemory/openshift-haproxy-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectMemory%2Fopenshift-haproxy-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectMemory%2Fopenshift-haproxy-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectMemory%2Fopenshift-haproxy-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectMemory%2Fopenshift-haproxy-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerfectMemory","download_url":"https://codeload.github.com/PerfectMemory/openshift-haproxy-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectMemory%2Fopenshift-haproxy-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29449370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-08T10:30:06.498Z","updated_at":"2026-02-14T16:32:56.052Z","avatar_url":"https://github.com/PerfectMemory.png","language":null,"readme":"# openshift haproxy-exporter\n\nThis project patches the `prom/haproxy-exporter:v0.8.0` docker image so that\nthe image can be used natively with the Openshift router addon without having\nto set the docker image entrypoint or command arguments.\n\n## How to use\n\nAs the openshift cluster administrator, run:\n\n```sh\noc adm router -n default --expose-metrics --metrics-image=jperville/openshift-haproxy-exporter:v0.8.0\n```\n\nThen, once the Openshift router service is available, run:\n\n```sh\noc annotate svc router -n default prometheus.io/scrape=true prometheus.io/port=9101 --overwrite\n```\n\n## Why?\n\nExposing haproxy metrics with Openshift is documented [here](https://docs.openshift.com/container-platform/3.5/install_config/router/default_haproxy_router.html#exposing-the-router-metrics);\nhowever, following the above instructions result does not result in the exporter scraping any haproxy metrics.\n\nThe reason is that the generated sidecar container is started without argument (using the default entrypoint),\nhaving no way to know how to access the haproxy statistics (which are password protected). The information to\naccess the haproxy instance is exposed through instance variables in the container, but the `/bin/haproxy_exporter` entrypoint\ndoes not know about those instance variables.\n\nTo use `prom/haproxy-exporter` image with the openshift router, the `router` deploymentconfig has to be edited\nto provide the `metrics-exporter` container with an explicit `command` which looks like this:\n\n```yaml\n      - name: metrics-exporter\n        command:\n        - /bin/sh\n        - -c\n        - exec /bin/haproxy_exporter --haproxy.scrape-uri \"http://${STATS_USERNAME}:${STATS_PASSWORD}@localhost:${STATS_PORT}/;csv\"\n```\n\nThis project simply wraps the `prom/haproxy-exporter` docker image to provide an openshift-compatible entrypoint, removing\nthe need to edit the deploymentconfig by hand.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectmemory%2Fopenshift-haproxy-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperfectmemory%2Fopenshift-haproxy-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectmemory%2Fopenshift-haproxy-exporter/lists"}