Technology
ClickHouse Cloud
Gain full visibility into your ClickHouse data with this managed integration. Dash0 simplifies ClickHouse setup and ongoing management.
Overview
Overview
ClickHouse is a highly-potent columnar database. If you want to, you can have ClickHouse Inc. run it for you in their cloud. If you are using their offering, you will still want insights into ClickHouse's behavior. To that extent, ClickHouse Cloud exposes metrics for its customers that you can view via Dash0.
Use Cases
- See statistics about ClickHouse parts.
- Inspect slow queries.
- Inspect storage and usage.
- See latency insights.
Setup
Overview
ClickHouse Cloud exposes metrics through a Prometheus endpoint that you can scrape. We recommend to scrape and forward these metrics via an OpenTelemetry Collector.
Retrieving Credentials
To start, you will need a few values and secrets from your ClickHouse Cloud installation. The ClickHouse Cloud documentation
explains how to access these. Once available, store these. In the next step, we will assume that these are exposed
through environment variables. We also recommend to define the name of the environment within an environment variable
called ENVIRONMENT_NAME.
Collector Configuration
The following code snippet shows an OpenTelemetry Collector configuration file. Be awared that the value of job_name
in the below configuration will be used as server.name attribute value.
receivers:
prometheus/clickhouse_cloud:
config:
scrape_configs:
- job_name: clickhouse_cloud
scrape_interval: 1m
scrape_timeout: 1m
honor_timestamps: true
static_configs:
- targets:
- api.clickhouse.cloud
relabel_configs:
- action: replace
target_label: deployment_environment_name
replacement: "${env:ENVIRONMENT_NAME}"
scheme: https
metrics_path: "/v1/organizations/${env:CLICKHOUSE_ORG_ID}/services/${env:CLICKHOUSE_SERVICE_ID}/prometheus"
basic_auth:
username: "${env:CLICKHOUSE_KEY_ID}"
password: "${env:CLICKHOUSE_KEY_SECRET}"
honor_labels: true
processors:
batch:
exporters:
otlp/dash0:
endpoint: "{{endpoint_otlp_grpc}}"
headers:
Authorization: "Bearer {{token}}"
"Dash0-Dataset": "{{dataset}}"
service:
pipelines:
metrics/kafka:
receivers: [prometheus/clickhouse_cloud]
processors: [batch]
exporters: [otlp/dash0]Collector Deployment
Learn how to deploy the collector within our OpenTelemetry collector integration documentation.

