Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Get Postgres time-series metrics

Beta
GET/v1/organizations/{organizationId}/postgres/{postgresId}/metrics

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future.

Returns bucketed time-series metrics for a PostgreSQL service over the requested window (CPU, memory, disk, network, connections, cache hit ratio, throughput, transactions, and more). Use this to chart or analyze how a service behaved over time.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization that owns the Postgres service.

    format: uuid
  • postgresIdstringrequired

    ID of the Postgres service.

    format: uuid

Query parameters

  • from_datestringrequired

    Inclusive start of the time window (RFC 3339 date-time).

    format: date-time
  • to_datestringrequired

    Exclusive end of the time window (RFC 3339 date-time).

    format: date-time
  • bucket_size_secondsoptionalinteger

    Time-series bucket size in seconds. When omitted, a bucket size is derived from the requested window. Requests are capped at 250 data points.

    minimum: 1

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalobject
    1 properties
    • metricsarray ofobjectrequired

      Available metrics, each with its bucketed time series.

      5 properties
      • keystringrequired

        Stable metric identifier (for example cpu_usage, connection_count, cache_hit_ratio).

      • namestringrequired

        Human-readable metric name.

      • unitstringrequired

        Unit of the metric values (for example %, IOPS, bytes/s, count).

      • descriptionstringrequired

        Human-readable description of what the metric measures.

      • seriesarray ofobjectrequired

        One series per label dimension of the metric.

        2 properties
        • labelstringrequired

          Distinguishing label for this series within the metric (for example a CPU mode, a database name, or "Reads").

        • dataPointsarray ofobjectrequired

          Time-ordered data points, one per bucket.

          2 properties
          • timestampintegerrequired

            Bucket start time as a Unix timestamp in seconds.

          • valuenumberrequired

            Metric value for the bucket.

Navigation