Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

List Prometheus scrape targets

Beta
GET/v1/organizations/{organizationId}/prometheus/discovery

Returns one Prometheus scrape target per service in the organization, in the HTTP service discovery (http_sd) format. Only services the API key is authorized to view are included; services that are being deleted or have been deleted are omitted.

Point an http_sd_configs job at this endpoint to discover and scrape all services in the organization automatically. Prometheus refreshes the target list on every discovery poll, so newly created and deleted services are picked up without configuration changes.

Discovered targets scrape with filtered_metrics=true by default; pass ?filtered_metrics=false to this endpoint to discover unfiltered targets. See the Prometheus integration guide for more on the exported metrics.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the requested organization.

    format: uuid

Query parameters

  • filtered_metricsoptionalstring

    Whether discovered targets scrape a filtered list of metrics. Sets the filtered_metrics parameter on each discovered target. Defaults to true.

    format: boolean

Response

JSON

200

Successful response

JSON
  • targetsoptionalarray ofstring

    Host (and port) of the ClickHouse Cloud API.

  • labelsoptionalobject
    6 properties
    • __scheme__optionalstring

      URL scheme Prometheus must scrape the target with.

    • __metrics_path__optionalstring

      Path of the per-service Prometheus metrics endpoint.

    • __param_filtered_metricsoptionalstring

      Value passed as the filtered_metrics query parameter on each scrape.

      format: boolean
    • clickhouse_org_idoptionalstring

      Organization ID the service belongs to.

      format: uuid
    • clickhouse_service_idoptionalstring

      Service ID.

      format: uuid
    • clickhouse_discovery_service_nameoptionalstring

      Service name.

Navigation