{"id":19341871,"url":"https://github.com/matchory/hetzner-cloud-prometheus-sd","last_synced_at":"2026-03-06T00:31:26.171Z","repository":{"id":61162450,"uuid":"547140381","full_name":"matchory/hetzner-cloud-prometheus-sd","owner":"matchory","description":"A simple web server exposing Hetzner cloud instances for consumption by the Prometheus HTTP service discovery.","archived":false,"fork":false,"pushed_at":"2024-07-08T04:32:16.000Z","size":294,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T10:03:07.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/matchory.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":"2022-10-07T07:40:51.000Z","updated_at":"2022-10-10T08:49:02.000Z","dependencies_parsed_at":"2023-10-03T12:34:40.096Z","dependency_job_id":"236ac558-237e-4b7d-81d6-c1b9fed8d211","html_url":"https://github.com/matchory/hetzner-cloud-prometheus-sd","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":0.4918032786885246,"last_synced_commit":"4b338e5633a5a02f8bd2c50e3aaab316dd998d2c"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/matchory/hetzner-cloud-prometheus-sd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matchory%2Fhetzner-cloud-prometheus-sd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matchory%2Fhetzner-cloud-prometheus-sd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matchory%2Fhetzner-cloud-prometheus-sd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matchory%2Fhetzner-cloud-prometheus-sd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matchory","download_url":"https://codeload.github.com/matchory/hetzner-cloud-prometheus-sd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matchory%2Fhetzner-cloud-prometheus-sd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"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-10T03:32:55.637Z","updated_at":"2026-03-06T00:31:26.154Z","avatar_url":"https://github.com/matchory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Prometheus: Hetzner Service Discovery ![Current Release](https://img.shields.io/npm/v/@matchory/hetzner-cloud-prometheus-sd/latest) ![License](https://img.shields.io/npm/l/@matchory/hetzner-cloud-prometheus-sd) [![Build](https://github.com/matchory/hetzner-cloud-prometheus-sd/actions/workflows/main.yaml/badge.svg)](https://github.com/matchory/hetzner-cloud-prometheus-sd/actions/workflows/main.yaml) ![Weekly Downloads](https://img.shields.io/npm/dw/@matchory/hetzner-cloud-prometheus-sd) ![Docker Build Status](https://img.shields.io/docker/cloud/build/matchory/hetzner-cloud-prometheus-sd)\n=====================================\n\u003e A server to provide automatic node discovery for Hetzner Cloud to Prometheus via HTTP service discovery.\n\nIn contrary to the integrated Hetzner SD configuration, this lets you use internal IPs and filter the node list using\nHetzner labels or node filters, for example.\n\nInstallation\n------------\nThe easiest option will be using our Docker image\n[`matchory/hetzner-cloud-prometheus-sd`](https://hub.docker.com/matchory/hetzner-cloud-prometheus-sd):\n\n```bash\ndocker run -p 127.0.0.1:7764:7764 matchory/hetzner-cloud-prometheus-sd --hetzner-api-token $HETZNER_API_TOKEN\n```\n\nYou can also install the npm package globally:\n\n```bash\nnpx @matchory/hetzner-cloud-prometheus-sd --hetzner-api-token $HETZNER_API_TOKEN\n```\n\nUsage\n-----\nUpon starting the server, it will continuously synchronize its list of Hetzner cloud nodes with the Hetzner API, and\nreturn those to requests on the `/sd` endpoint. Additionally, the server also provides its own metrics endpoint.\n\nConfiguration\n-------------\nThe server may be configured using command-line options, environment variables, or its configuration file. The following\ntable shows all available settings:\n\n| CLI option                 | Environment variable           | Default value | Description                                                                                                              |\n|:---------------------------|:-------------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------|\n| `-t`, `--api-token`        | `HETZNER_SD_API_TOKEN`         | -             | API token obtained from Hetzner Cloud (**required**).                                                                    |\n| `-h`, `--hostname`         | `HETZNER_SD_HOSTNAME`          | `localhost`   | Hostname to listen on.                                                                                                   |\n| `-a`, `--auth-bearer`      | `HETZNER_SD_AUTH_BEARER`       | -             | Bearer token to verify on incoming requests. Mutually exclusive with `--auth-basic`.                                     |\n| `-A`, `--auth-basic`       | `HETZNER_SD_AUTH_BASIC`        | -             | Basic auth credentials to verify on incoming requests, provided as `user:pass`. Mutually exclusive with `--auth-bearer`. |\n| `-p`, `--port`             | `HETZNER_SD_PORT`              | `7764`        | Port to listen on.                                                                                                       |\n| `-H`, `--https`            | `HETZNER_SD_HTTPS`             | _false_       | Use HTTPS for the listening socket. Required for mTLS.                                                                   |\n| `--m-tls-ca`               | `HETZNER_SD_MTLS_CA`           | -             | Path to the mTLS certificate authority file. Ignored unless https is enabled.                                            |\n| `-r`, `--refresh-interval` | `HETZNER_SD_REFRESH_INTERVAL`  | `30000` (30s) | How often to synchronize with the Hetzner API in ms.                                                                     |\n| `--metrics-endpoint`       | `HETZNER_SD_METRICS_ENDPOINT`  | `/metrics`    | Endpoint to provide server metrics on.                                                                                   |\n| `--node-port`              | `HETZNER_SD_NODE_PORT`         | `9090`        | Port _on the nodes_ Prometheus should connect to.                                                                        |\n| `--node-network`           | `HETZNER_SD_NODE_NETWORK`      | -             | Name, ID, or CIDR range of the network to prefer when resolving nodes. If omitted, the public IP will be preferred.      |\n| `--node-label-prefix`      | `HETZNER_SD_NODE_LABEL_PREFIX` | `hetzner`     | Prefix for labels attached to discovered nodes-                                                                          |\n| `--log-level`              | `HETZNER_SD_LOG_LEVEL`         | `debug`       | Log level for the server (must be one of `debug`, `info`, `warn` or `error`).                                            |\n| `--debug`                  | `HETZNER_SD_DEBUG`             | _false_       | Enable debug mode. This will also include additional debugging information in HTTP responses.                            |\n\n\u003e **Note:**  \n\u003e You can provide token parameters in secret files using the environment variables with a `_FILE` suffix, e.g. \n\u003e `HETZNER_SD_API_TOKEN_FILE`. This variable is expected to contain an absolute path to a file on the filesystem which\n\u003e contains the secret. Trailing whitespace will be removed; the secret will be read once, and cached for the runtime of\n\u003e the server. This works for the API token and authentication credentials, so currently we support the following \n\u003e secret files:\n\u003e  - `HETZNER_SD_API_TOKEN_FILE`\n\u003e  - `HETZNER_SD_AUTH_BEARER_FILE`\n\u003e  - `HETZNER_SD_AUTH_BASIC_FILE`\n\nDevelopment\n-----------\nFor local development, you'll want to use `yarn dev` to compile the TypeScript sources and start the server.\n\n### Contributing\nWe welcome all contributions. If you need help or would like to see a feature implemented, please get in touch.\n\n### Releasing\nTo publish a new release, use the [`np`](https://github.com/sindresorhus/np) utility on the command line.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatchory%2Fhetzner-cloud-prometheus-sd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatchory%2Fhetzner-cloud-prometheus-sd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatchory%2Fhetzner-cloud-prometheus-sd/lists"}