{"id":15003460,"url":"https://github.com/zcubbs/hpxd","last_synced_at":"2026-02-06T20:01:56.052Z","repository":{"id":197319622,"uuid":"698425252","full_name":"zcubbs/hpxd","owner":"zcubbs","description":"Hpxd is a dynamic HAProxy configurator. It pulls configuration files from a Git repository and keeps HAProxy updated with the latest changes. It also provides integration with Prometheus for monitoring and metrics.","archived":false,"fork":false,"pushed_at":"2023-10-01T00:44:50.000Z","size":336,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T00:56:39.404Z","etag":null,"topics":["daemon","git","haproxy","linux"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcubbs.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-29T22:25:54.000Z","updated_at":"2023-10-03T07:21:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e66458d8-b177-4de6-b83c-faac7f91e0c0","html_url":"https://github.com/zcubbs/hpxd","commit_stats":null,"previous_names":["zcubbs/hpxd"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/zcubbs/hpxd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcubbs%2Fhpxd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcubbs%2Fhpxd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcubbs%2Fhpxd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcubbs%2Fhpxd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcubbs","download_url":"https://codeload.github.com/zcubbs/hpxd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcubbs%2Fhpxd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29174325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T19:56:27.068Z","status":"ssl_error","status_checked_at":"2026-02-06T19:56:18.934Z","response_time":59,"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":["daemon","git","haproxy","linux"],"created_at":"2024-09-24T18:58:33.669Z","updated_at":"2026-02-06T20:01:56.037Z","avatar_url":"https://github.com/zcubbs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hpxd\n\n`hpxd` is a daemon that runs on a node and manages the state of HAProxy. It listens for changes from a specified Git repository and updates the HAProxy configuration accordingly.\n\n[![tag](https://img.shields.io/github/tag/zcubbs/hpxd)](https://github.com/zcubbs/hpxd/releases)\n![Go Version](https://img.shields.io/badge/Go-%3E%3D%201.21-%23007d9c)\n[![GoDoc](https://godoc.org/github.com/zcubbs/hpxd?status.svg)](https://pkg.go.dev/github.com/zcubbs/hpxd)\n[![Lint](https://github.com/zcubbs/hpxd/actions/workflows/lint.yaml/badge.svg)](https://github.com/zcubbs/hpxd/actions/workflows/lint.yaml)\n[![Scan](https://github.com/zcubbs/hpxd/actions/workflows/scan.yaml/badge.svg?branch=main)](https://github.com/zcubbs/hpxd/actions/workflows/scan.yaml)\n![Build Status](https://github.com/zcubbs/hpxd/actions/workflows/test.yaml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/zcubbs/hpxd)](https://goreportcard.com/report/github.com/zcubbs/hpxd)\n[![License](https://img.shields.io/github/license/zcubbs/hpxd.svg)](./LICENSE)\n\n---\n\u003cp align=\"center\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"350\" src=\"docs/assets/logo.png\"\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- **Dynamic Configuration Updates**: Polls a Git repository for changes in HAProxy configuration and applies them dynamically.\n- **Prometheus Metrics**: Provides metrics on Git pull successes/failures, HAProxy reloads, and configuration validation.\n- **Cross-Platform**: Builds available for Linux (`amd64` and `arm64`).\n\n## Installation\n\n### From Binary\n\nYou can download the latest release from [here](https://github.com/zcubbs/hpxd/releases).\n\nIf you prefer to install using a script:\n\n```bash\ncurl -sfL https://raw.githubusercontent.com/zcubbs/hpxd/main/scripts/install.sh | sudo bash -s -- \\\n    --repo-url https://github.com/yourusername/haproxy-configs.git \\\n    --branch main \\\n    --path /path/to/file/in/repo/haproxy.cfg \\\n    --haproxy-config-path /path/to/haproxy.cfg\n```\n\n### From Source\n\n```bash\ngo get github.com/zcubbs/hpxd\ncd $GOPATH/src/github.com/zcubbs/hpxd\ngo install ./...\n```\n\n## Usage\n\nYou'll need a configuration file (by default, the tool looks for ./configs/hpxd.yaml).\n\n```yaml\nrepoURL: https://github.com/yourusername/haproxy-configs.git\nbranch: main\nhaproxyConfigPath: /path/to/haproxy.cfg\npollingInterval: 5s\nenablePrometheus: true\nprometheusPort: 9100\n```\n\nThen, run the tool:\n\n```bash\nhpxd -c /path/to/config.yaml\n```\n\n## Handling of Repository Credentials\n\nIf you're using a private Git repository, `hpxd` requires credentials for access. These credentials should be provided through environment variables to maintain security.\n\n### Setup for Private Repositories:\n\n1. **Username:** Set the `HPXD_GIT_USERNAME` environment variable to your Git username.\n\n2. **Password/Token:** Set the `HPXD_GIT_PASSWORD` environment variable to your Git password or, preferably, a personal access token if you're using platforms like GitHub, GitLab, etc.\n\n```bash\nexport HPXD_GIT_USERNAME=your_git_username\nexport HPXD_GIT_PASSWORD=your_git_password_or_token\n```\n\n## Monitoring Metrics\n\nMonitoring is available for the application, and the following metrics are tracked:\n\n- **hpxd_git_pulls_total**:\n    - Description: Total number of times the config is pulled from Git.\n    - Labels: `status` (values: success or failure).\n\n- **hpxd_haproxy_reloads_total**:\n    - Description: Total number of times HAProxy is reloaded.\n\n- **hpxd_invalid_configs_total**:\n    - Description: Total number of times an invalid config is detected.\n\n- **application_info**:\n    - Description: Provides application details such as version, commit, and build date.\n    - Labels: `version`, `commit`, `buildDate`.\n\nThese metrics can be accessed via Prometheus and visualized using Grafana.\n\n![monitoring](docs/assets/monitoring.png)\n\n## Development\n\n\u003e Prerequisites\n\u003e - Docker (https://rancherdesktop.io/)\n\u003e - Task (https://taskfile.dev/#/installation)\n\u003e \n\n### Setup Development Environment\n\n#### 1. Build the development Docker image:\n    \n```bash\ntask build-docker-dev\n```\n\n#### 2. Run the development Docker container:\n\n```bash\ntask run-docker-dev\n```\n\n#### 3. Build and test your Go project:\n\n```bash\ntask build\ntask test\n```\n\n#### 4. Install/Uninstall:\n\n```bash\ntask install\ntask uninstall\n```\n\n### Contributing\n\nContributions are welcome! Please read the contribution guidelines before submitting a pull request.\n\n### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n### Support and Feedback\n\nIf you need support or have any feedback, please open an issue [here](https://github.com/zcubbs/hpxd/issues/new)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcubbs%2Fhpxd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcubbs%2Fhpxd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcubbs%2Fhpxd/lists"}