Skip to content
You are viewing the documentation for Solo Enterprise for Istio, formerly known as Gloo Mesh (OSS APIs).

ClickHouse data store

Page as Markdown

Learn how the Solo UI stores telemetry data in ClickHouse, how to bring your own ClickHouse instance, and how to query data directly.

All telemetry data collected by the OpenTelemetry pipeline is stored in ClickHouse. The Solo UI reads directly from ClickHouse to power the service graph, metrics views, and resource overviews.

Tables

ClickHouse stores each telemetry type in a separate table. All tables are in the platformdb database.

TableContent
otel_metrics_gaugeGauge metrics scraped from Istio components
otel_metrics_sumSum metrics scraped from Istio components
otel_metrics_summarySummary metrics scraped from Istio components
otel_metrics_histogramHistogram metrics scraped from Istio components
otel_metrics_exp_histogramExponential histogram metrics scraped from Istio components
otel_logs_jsonKubernetes events from the local cluster
otel_k8sobjects_jsonKubernetes object snapshots for the resource overview

Storage

The ClickHouse pod uses an EmptyDir volume. Data is not persisted across pod restarts; if the solo-management-clickhouse-shard0-0 pod is deleted or restarted, all telemetry history is lost and the UI begins repopulating from the time the pod comes back online. For production environments where data persistence matters, replace the bundled instance with an external ClickHouse that you manage. For steps, see Bring your own ClickHouse.

Query data directly

You can run SQL queries against ClickHouse directly from the pod to inspect raw telemetry data or diagnose pipeline issues. The following steps apply to the bundled ClickHouse instance. For external instances, connect by using your ClickHouse client of choice.

The following steps use the default release name solo-management and namespace solo-enterprise. If you used different values, update the commands accordingly.

  1. Get the ClickHouse credentials from the secret.

    export CH_USER=$(kubectl get secret solo-management-clickhouse-auth -n solo-enterprise -o jsonpath='{.data.username}' | base64 -d)
    export CH_PASS=$(kubectl get secret solo-management-clickhouse-auth -n solo-enterprise -o jsonpath='{.data.password}' | base64 -d)
  2. Open a shell in the ClickHouse pod.

    kubectl exec -it -n solo-enterprise solo-management-clickhouse-shard0-0 -- clickhouse-client --user ${CH_USER} --password ${CH_PASS}
  3. Run queries against the platformdb database. The following examples show common queries.

    List all tables.

    SHOW TABLES FROM platformdb;

    Count the number of metrics stored.

    SELECT count() FROM platformdb.otel_metrics_gauge;

Bring your own ClickHouse

Replace the bundled ClickHouse instance with an external instance that you manage. This method is recommended for production environments where persistent storage and independent lifecycle management are required.

Prerequisites

  • A ClickHouse version 22.x or later instance that is accessible from your cluster on port 9000 (native TCP protocol).
  • A ClickHouse admin user with permission to create databases and tables. For production environments, create a separate read-write user for the Solo UI after the schema is initialized.
  • Network connectivity from the solo-enterprise namespace to your ClickHouse host

Configure the Helm chart

To switch to an external ClickHouse instance, disable the bundled deployment and provide your connection details.

Option 1: Pass credentials directly in Helm values

In your Helm values file for the management chart, set clickhouse.enabled to false and provide the connection details inline. The chart automatically generates the connection secret from these values.

clickhouse:
  enabled: false
ui:
  backend:
    clickhouse:
      generateConfig: true
      address: <clickhouse-host>
      port: 9000
      database: platformdb
      username: <username>
      password: <password>

Apply these values when you install or upgrade the Solo UI chart.

helm upgrade solo-enterprise solo-enterprise/management \
  --namespace solo-enterprise \
  --reuse-values \
  -f your-values.yaml

Option 2: Use a pre-existing secret

If you manage credentials outside of Helm, create the secret before installing the chart and set generateConfig to false.

  1. Create the secret in the solo-enterprise namespace.

    kubectl create secret generic clickhouse-config \
      --namespace solo-enterprise \
      --from-literal=config.json='{"address":"<clickhouse-host>","port":9000,"database":"platformdb","username":"<username>","password":"<password>"}'
  2. Reference the secret in your Helm values file for the management chart.

    clickhouse:
      enabled: false
    ui:
      backend:
        clickhouse:
          generateConfig: false
          secretRef: clickhouse-config
  3. Apply these values when you install or upgrade the Solo UI chart.

    helm upgrade solo-enterprise solo-enterprise/management \
      --namespace solo-enterprise \
      --reuse-values \
      -f your-values.yaml

Helm values reference

ValueDefaultDescription
clickhouse.enabledtrueDeploy the bundled ClickHouse instance. Set to false for BYO.
ui.backend.clickhouse.generateConfigtrueGenerate the connection secret from Helm values. Set to false to reference a pre-existing secret.
ui.backend.clickhouse.secretRefclickhouse-configName of the Kubernetes Secret to create or reference.
ui.backend.clickhouse.address""External ClickHouse host. Must be reachable from the solo-enterprise namespace on port 9000 (native TCP). When empty, the bundled service DNS is used.
ui.backend.clickhouse.port9000ClickHouse native protocol port.
ui.backend.clickhouse.databaseplatformdbClickHouse database name.
ui.backend.clickhouse.usernamedefaultClickHouse username. Optional if you supply credentials via a pre-existing Secret using secretRef.
ui.backend.clickhouse.passwordpasswordClickHouse password. Optional if you supply credentials via a pre-existing Secret using secretRef.

Schema initialization

When you install or upgrade the chart, an init container runs the migrations tool to create the platformdb database and apply all table schemas against your external ClickHouse host. This creates and evolves schema only, and does not migrate or move existing data. No manual schema setup is required as long as the admin credentials have CREATE DATABASE and CREATE TABLE privileges.

If you need to initialize the schema outside of a Helm deployment, such as in a CI environment or to pre-initialize the database before a first install, run the migrations container directly.

docker run --rm \
  <registry>/solo-enterprise/solo-enterprise-migrations:<version> \
  init --host=<clickhouse-host> --port=9000 --database=platformdb \
  --adminuser=<username> --adminpassword=<password>

docker run --rm \
  <registry>/solo-enterprise/solo-enterprise-migrations:<version> \
  migrate-up --host=<clickhouse-host> --port=9000 --database=platformdb \
  --adminuser=<username> --adminpassword=<password>

The migrations tool is safe to re-run. Running migrate-up on an already-initialized database applies only new migrations and skips existing ones.

Troubleshooting

Init container fails with connection refused

Verify that ui.backend.clickhouse.address resolves from within the cluster and that port 9000 is reachable. Test connectivity with a temporary pod.

kubectl run ch-test --rm -it --image=clickhouse/clickhouse-client \
  --namespace solo-enterprise --restart=Never -- \
  --host=<clickhouse-host> --port=9000 \
  --user=<username> --password=<password> \
  --query="SELECT 1"

UI backend fails to start

The connection secret must contain all four fields: address, database, username, and password. Inspect the generated secret.

kubectl get secret clickhouse-config -n solo-enterprise \
  -o jsonpath='{.data.config\.json}' | base64 -d