API referenceConsole
Cloud provider
Polylane maps your ClickHouse Cloud services, reads their CPU, memory, connection and query metrics, and investigates stopped or degraded services.

Connect

Connect ClickHouse from the terminal. Pass --help for the flags ClickHouse accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider clickhouse

How it works

Infrastructure graph

Polylane syncs the organization every 15 minutes. Each service becomes a node, with its state, tier, region, cloud provider, ClickHouse version, replica sizing and connection endpoints. A secondary service in a data warehouse links to the primary service of that warehouse.

Polylane uses the connection hostnames for cross-cloud links. An application that reaches a service through an environment variable links to that service on the topology.

Checks

By default, Polylane counts the unhealthy services every 30 minutes. A service that is degraded, failed, stopped or partially running is unhealthy. Idle and waking services are normal for idle-scaled services, so they stay healthy. The usual count is zero for most organizations, and Polylane compares each count with the history of the account to find an issue.

Metrics

The ClickHouse Cloud control plane gives metrics only as a live snapshot, with no history. Thus services show no metric charts. During an investigation, agents read the current CPU, memory, connection, query and replica values from the Prometheus endpoint of the control plane. To see a trend, an agent takes two readings a few minutes apart.

Investigations

Agents list services with their state and sizing, and read other ClickHouse Cloud API endpoints, such as backups, settings and usage cost. The control plane has no SQL access, so agents do not query the data in your databases.

Writes

The ClickHouse Cloud API tool can send write requests. A Developer key is read-only, so ClickHouse Cloud refuses these writes. If you connect a key with more access, the connection still starts in read-only mode: Polylane refuses each write until a workspace admin turns read-only mode off. After that, each write needs safety review and your approval before it runs.

Troubleshooting

"ClickHouse Cloud does not recognize this API key" error

  • You must give the key ID and the key secret. One value alone cannot authenticate.
  • Make sure that the key is not deleted or disabled in the API key settings of ClickHouse Cloud.
  • A key with an expiry date stops working when it expires. Create a new key and rotate it in Polylane.

"This ClickHouse Cloud API key cannot read your organization" error

  • Create a new API key with the Developer role in your organization settings.

Missing resources

  • The first sync can take a few minutes.
  • Click Sync in the account header to start a sync immediately.

Rate limits

  • ClickHouse Cloud allows 10 API requests in 10 seconds for each key. Use a key only for Polylane, so that other tools do not use the same budget.

Disconnecting

Disconnecting stops every sync and check, and deletes the key that Polylane stored. The key stays valid in ClickHouse Cloud. Delete it in your ClickHouse Cloud organization settings.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in ClickHouse is removed as well; nothing is left behind.

Terminal
polylane cloud disconnect <id>

Tools

3

Operations agents can perform in threads.

clickhouseApi
Call any ClickHouse Cloud API endpoint that lacks a dedicated tool
clickhouseListServices
List ClickHouse Cloud services with state, sizing, version, and endpoints
clickhouseGetMetrics
Read live ClickHouse Cloud service metrics (CPU, memory, connections, queries) from the Prometheus endpoint

Supported resources

1

Resource types that show up in your infrastructure graph.

Service