Skip to main content

discovr

CI PyPI License

HTTP service discovery for Prometheus, backed by cloud provider APIs.

discovr exposes one endpoint per provider that returns your running instances in the http_sd_config format, so Prometheus can scrape them without a static target list. Provider credentials are never stored: Prometheus passes them per request as a bearer token, and discovr forwards them to the provider API.

Supported providers:

Provider Endpoint Credentials
cloudscale.ch GET /v1/cloudscale-ch API token
Exoscale GET /v1/exoscale <key>:<secret>
CloudStack GET /v1/cloudstack <key>:<secret>

Targets are returned on port 9100 (the Prometheus node_exporter default). Instance metadata is exposed as __meta_<provider>_* labels; use Prometheus relabel_configs to keep the ones you want.

Install

With uv:

uv tool install discovr-ngine
discovr --host 0.0.0.0 --port 8000

Or with the container image:

docker run --rm -p 8000:8000 ghcr.io/ngine-io/discovr:latest

Interactive API docs are then served at http://localhost:8000/.

Configure

All settings are optional and read from the environment or a local .env file.

Variable Default Description
APP_NAME Clouds Service Discovery API Title shown in the API docs.
URL_PREFIX (empty) Path prefix, e.g. /api when running behind a reverse proxy.
HOST 127.0.0.1 Address to bind to.
PORT 8000 Port to bind to.
LOG_LEVEL INFO One of DEBUG, INFO, WARNING, ERROR.

Use with Prometheus

scrape_configs:
  - job_name: cloudscale.ch nodes
    http_sd_configs:
      - url: "http://discovr:8000/v1/cloudscale-ch"
        authorization:
          type: Bearer
          credentials: <your-cloudscale-api-token>

discovr has no authentication of its own — the bearer token is the provider credential. Run it on a trusted network, or put it behind a reverse proxy that terminates TLS and restricts access. Use a read-only API token of your provider if possible.

A runnable Prometheus setup is in sample/:

docker compose up

Develop

uv sync           # create the virtualenv and install everything
uv run discovr --reload
uv run pytest
uv run ruff check .
uv run ruff format .

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discovr_ngine-0.1.0.tar.gz (72.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discovr_ngine-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file discovr_ngine-0.1.0.tar.gz.

File metadata

  • Download URL: discovr_ngine-0.1.0.tar.gz
  • Upload date:
  • Size: 72.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for discovr_ngine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2fe4f7c5ad8d163a283818f1b431c181ec0dcc269d0c3ace6bd1f46240a22d1a
MD5 b1075ec64fdaff68edd5433051b59420
BLAKE2b-256 e7b6ac5df6b68741078ec544680ddb958201c9ce0ffaabf4f955c5b599951f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for discovr_ngine-0.1.0.tar.gz:

Publisher: release.yml on ngine-io/discovr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file discovr_ngine-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: discovr_ngine-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for discovr_ngine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8818a8095987a5e5d5c4bad0c3db70bfd99c21487dfcf349c192072028612631
MD5 19a4dee2f25fbff69b040375cb2c8b8e
BLAKE2b-256 e747762af624781633c0bd3905ba4506c5f36ef0f0eba49587b53305fe5456f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for discovr_ngine-0.1.0-py3-none-any.whl:

Publisher: release.yml on ngine-io/discovr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page