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

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

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.

Supported versions

Solo Enterprise for Istio supports two ClickHouse LTS release lines at a time. ClickHouse publishes an LTS release twice a year, in March and August, and supports each line for one year. When a new LTS line ships, the bundled version advances to it, and the line that it replaces becomes the previous supported line.

RoleLineImage
Current26.3 LTSclickhouse/clickhouse-server:26.3.17-alpine
Previous25.8 LTSclickhouse/clickhouse-server:25.8.24-alpine

The current line is the version that the management chart bundles. The previous line is supported for instances that you bring yourself, and an in-place upgrade from that line to the current line is tested. Support applies to the whole line, so every patch release within a supported line is supported too. Treat a patch upgrade within a line as a normal operational task, not a version migration.

Important

The minimum version for an instance that you bring yourself is 25.3, the release in which the native JSON type that the schema depends on became production ready. Releases earlier than 25.3 cannot run the migrations.

Version 26.1 is a short-term support release and is not part of the matrix. Installations that were created before the 26.3 bundle still run it, and an in-place upgrade from 26.1 to the current bundled version is tested.

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 bundled ClickHouse pod stores its data in an EmptyDir volume. Data does not survive a pod restart. If the solo-management-clickhouse-shard0-0 pod is deleted or restarted, all telemetry history is lost, and the UI repopulates from the time that the pod comes back online. For production environments where data persistence matters, replace the bundled instance with an external ClickHouse instance that you manage. For steps, see Bring your own ClickHouse.

Data retention

Cap how long ClickHouse keeps your telemetry data. By default, the trace and span tables ship with no retention limit, and grow until you cap them or the disk fills.

The other telemetry tables keep a fixed time to live that you do not manage. The raw metric tables expire after 15 days, the log table after 30 days, and the Kubernetes object tables after 60 days.

Cap retention with the dbctl tool in the migrations image, from a host that can reach your ClickHouse endpoint. The tool connects over the native protocol on port 9000 without TLS. For a TLS endpoint, add --port=9440 and --secure, and add --tls-ca for a private certificate authority.

Warning

A cap permanently deletes all data that is older than the horizon that you set. Widening the cap later does not bring that data back, because the next merge drops whole partitions past the horizon.

  1. Review the current retention of each managed table.

    docker run --rm \
      <registry>/solo-enterprise/solo-enterprise-migrations:<version> \
      retention show --host=<clickhouse-host> --database=platformdb \
      --username=<username> --password=<password>
  2. Cap retention at a number of days, or lift the cap again with --unlimited. The --yes flag answers the confirmation prompt, which a container with no terminal attached cannot answer. The --unlimited flag does not prompt.

    docker run --rm \
      <registry>/solo-enterprise/solo-enterprise-migrations:<version> \
      retention set --days 90 --yes --host=<clickhouse-host> --database=platformdb \
      --username=<username> --password=<password>

Not every table is managed. The raw metric tables keep their own 15 day TTL. Tables whose TTL expresses something other than retention are left alone, including the tombstone grace on the Kubernetes object state, the liveness horizon on the Istio gauges, and the refresh anchor on the metric metadata. Capping those changes behavior rather than disk use.

Sizing

Size a ClickHouse instance for the size of your mesh, not for the traffic that flows through it. The bundled instance and an instance that you bring yourself size the same way. Istio aggregates counters and latency histograms into per-minute rollups as they arrive. A Fleet Graph render reads those rollups, so the cost of a render depends on two things: the number of workload-to-workload edges that Istio reports, and the time window on screen. Request volume and retention do not change that cost.

The figures in this section come from benchmarks with synthetic meshes on a single node. Use them to compare one mesh size against another rather than as exact times, and confirm them against your own mesh before you commit to a number.

Start from the default node

Start a single ClickHouse node at 8 GiB of memory and 4 vCPU. A larger mesh needs more CPU, because rendering the Fleet Graph is CPU-bound, but does not need more memory.

ResourceStart withIncrease toWhen to increase
Memory8 GiB16 GiBMany concurrent dashboard users, or a very large Kubernetes inventory
CPU4 vCPU8 vCPUA large mesh, because the graph render is CPU-bound

Size the disk

Each edge produces the same number of rows at any request rate, because Istio counters are scraped on an interval rather than emitted for each request. The following figures are for each 1,000 edges at the default 15 second scrape interval.

TableRows each day for each edgeBytes for each rowMB each day for each 1,000 edges
otel_metrics_sum48,400~11~550
otel_metrics_histogram11,500~36~415
otel_metrics_data, otel_metrics_histogram_data60,000~10~600
istio_edge_minute_state12,1002 to 3~35
istio_latency_minute_state2,90022 to 28~75

Each table carries the 15 day time to live, so the steady state is 15 times the daily figure: approximately 25 GB for each 1,000 edges, or approximately 1.7 GB each day. The raw otel_metrics_sum and otel_metrics_histogram tables hold most of that volume, and nothing reads them after the materialized views run at insert time. The rollups that serve the graph are small.

otel_metrics_metadata is bounded by series cardinality rather than by time, at approximately 100 B for each distinct label set and approximately 11 series for each edge. Workload churn, such as deployments cycling or principals rotating, adds new series that persist for 15 days, so a fleet with high churn carries several times its live series count.

The synthetic data compresses better than production payloads, so treat these figures as a lower bound and add margin.

Size for the graph render

A cold render costs approximately 300 ms, plus approximately 0.6 to 0.7 ms for each edge at the default 15 minute window. The following table gives the measured times for three mesh sizes.

Mesh, as workloads and edges50 and 1121,000 and 2,1054,500 and 9,310
Cold graph render0.8 s1.2 s6.3 s
Workload enrichment24 ms32 ms61 ms
Filters, search, health, and detail panels5 to 60 ms10 to 100 ms11 to 100 ms

A render scans the edge rollups for the window on screen, so a longer window costs more. On the 1,000 workload mesh, a render costs 1.2 s at both the 5 minute and 15 minute windows, 2.5 s at 30 minutes, and 3.4 s at 60 minutes. Two things do not change this cost: the amount of history that the database holds, and the number of hours of data in the current day partition.

Review the following behavior before you size a node for a large mesh.

BehaviorDescription
Viewers of one view share a renderThe server caches a render for 15 seconds, the default refresh period of the UI, and collapses concurrent identical requests into one. Any number of viewers of the same view cost one render.
Distinct views render in parallelA different aggregation level, window, filter set, or focused node is its own cache entry and its own render. Budget the cost of one cold render for each distinct view that you expect on screen at once.
Coarser levels cost far lessThe cluster and namespace levels are three to four times cheaper than the workload level at scale, and a namespace filter cuts the workload view from 6.3 s to 2.4 s on the 9,310 edge mesh. Past approximately 10,000 edges, point users at the coarser levels, filters, and focus mode rather than at a larger node.
Memory for each render is boundedEvery query that a render runs reads a per-minute rollup or a capped enrichment scan, so no single query is unbounded. Enrichment scans are capped at 1 GiB each with two running concurrently, which you can change with ui.backend.fleetGraph.enrichmentMaxMemoryBytes and ui.backend.fleetGraph.enrichmentConcurrency.
Very large scans truncate rather than failGraph scans stop at 500,000 rows and return a warning instead of an error. Only a very large mesh reaches that ceiling at the workload level.

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 instance from a supported release line that is accessible from your cluster on the native TCP protocol port. See Supported versions.
  • 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

Note

Connections use TLS by default. Certificate verification is never disabled. If your endpoint presents a certificate from a private CA, supply the PEM bundle in clickhouse.external.tls.ca, which the chart renders into the generated configuration Secrets as ca.crt.

The consumers of the database do not share one protocol, which is why the configuration carries two ports. The UI backend, the dbctl tool, and the OTel exporters use the native protocol, and the agent evaluations service uses the HTTP interface.

Configure the Helm chart

To switch to an external ClickHouse instance, disable the bundled deployment, point the chart at your endpoint, and supply the credentials that the Solo UI uses to connect.

Step 1: Point the chart at your endpoint

Set the endpoint once in clickhouse.external. The chart feeds that one endpoint to every consumer of the database: the UI backend, the dbctl tool, both collector exporters, and the agent evaluations service. This block is mutually exclusive with the bundled instance, which the chart validates when it renders. When clickhouse.external.enabled is true, the endpoint in that block takes precedence over ui.backend.clickhouse.address.

clickhouse:
  enabled: false
  external:
    enabled: true
    address: my-service.clickhouse.cloud
    port: 9440          # native protocol: UI backend, dbctl, and the collectors
    httpPort: 8443      # HTTP interface: agent evaluations
    tls:
      enabled: true
      ca: ""            # PEM bundle, only for a private CA

If your endpoint is a self-managed replicated cluster, set the additional fields in Connect to a replicated cluster before you continue.

The connecting user needs permission to create the databases and apply schema changes. If your database administrator runs schema changes separately, set ui.backend.database.skipMigrations to true. Startup then verifies the schema instead of applying it, and fails with a message that names the missing work rather than making the change itself.

Step 2: Supply the credentials

The database name and credentials always come from ui.backend.clickhouse, whichever endpoint shape you used. Choose how they reach the pods.

Option 1: Let the chart generate the Secret

Provide the credentials in your Helm values file for the management chart. The chart generates the connection Secret from these values, and every consumer of the database reads it.

  1. Provide the credentials in your Helm values file for the management chart.

    ui:
      backend:
        clickhouse:
          generateConfig: true
          database: platformdb
          username: <username>
          password: <password>
  2. 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. The chart generates no secret in this mode, so the secret that you supply carries the endpoint as well as the credentials. Include the address and port keys even when you set clickhouse.external, because the UI backend and the collector exporters read the endpoint from your secret rather than from that block. Set clickhouse.external.enabled and clickhouse.external.tls anyway, because the chart reads those values when it renders the TLS settings of the collector exporters and the configuration of the agent evaluations service.

  1. Create the secret in the solo-enterprise namespace using the flat-key format.

    kubectl create secret generic clickhouse-config \
      --namespace solo-enterprise \
      --from-literal=address=<clickhouse-host> \
      --from-literal=port=9000 \
      --from-literal=database=platformdb \
      --from-literal=username=<username> \
      --from-literal=password=<password>

    Note

    For a TLS endpoint, add a tls key set to true. For a private CA, add the PEM bundle under a ca.crt key.

  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

Connect to a replicated cluster

For a self-managed replicated ClickHouse cluster, set clickhouse.external.replicated so that the migrations produce replicated schema. The migration SQL itself stays the same. As dbctl applies each migration, it creates the database with the Replicated engine and rewrites MergeTree-family table engines to their Replicated counterparts. One schema therefore serves standalone, replicated, and hosted deployments.

clickhouse:
  enabled: false
  external:
    enabled: true
    address: ch.example.internal
    replicated: true
    replicaAddresses:
      - ch-0.example.internal:9440
      - ch-1.example.internal:9440
    migrateAddress: ch-0.example.internal:9440

Important

Leave replicated set to false for ClickHouse Cloud and other hosted services, which replicate on their own.

A Replicated database exists only on the servers that ran the CREATE statement, so replicaAddresses lists every replica for the one-time bootstrap. Leave the list empty for a cluster whose operator synchronizes databases across replicas, such as the ClickHouse Kubernetes operator with enableDatabaseSync enabled, which is its default. Bootstrap then uses clickhouse.external.address alone.

Bootstrap tolerates a replica that is down. After the database exists on at least one member, the rest are reported as warnings, and a skipped replica converges on a later startup or when you run dbctl init. A database that already exists with an engine other than Replicated fails startup instead, because schema changes applied to it can never replicate.

Set migrateAddress whenever address load-balances across replicas. This setting pins migrations and schema version reads to one designated replica, so that a lagging replica cannot report a stale schema version and cause a migration to be applied twice.

Review the following behavior on a replicated endpoint.

BehaviorDescription
Reads are eventually consistentReplicas typically converge in less than a second. The time-bounded windows that the UI queries tolerate that lag.
Insert retries deduplicateRetried inserts deduplicate by block, so a retry does not double count.
Materialized views run onceA view runs only on the replica that ingests the data, and its target table replicates, so aggregates are not double counted. The Replicated database coordinates the refreshable view, so exactly one replica runs each refresh.

Helm values reference

ValueDefaultDescription
clickhouse.enabledtrueDeploy the bundled ClickHouse instance. Set to false to bring your own.
ui.backend.clickhouse.generateConfigtrueGenerate the connection Secret from Helm values. Set to false to reference a pre-existing Secret.
ui.backend.clickhouse.secretRef""Name of the Kubernetes Secret to create or reference. When empty, the chart derives solo-enterprise-clickhouse-config, or <nameOverride>-clickhouse-config when a naming override is set.
ui.backend.clickhouse.address""External ClickHouse host. When clickhouse.external.enabled is true, that block takes precedence. 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 in a pre-existing Secret with secretRef.
ui.backend.clickhouse.passwordpasswordClickHouse password. Optional if you supply credentials in a pre-existing Secret with secretRef.

The following values configure an external or hosted endpoint for every consumer of the database at once.

ValueDefaultDescription
clickhouse.external.enabledfalseUse an external ClickHouse endpoint instead of the bundled instance. Also set clickhouse.enabled to false.
clickhouse.external.address""External ClickHouse host, with no scheme and no port. Takes precedence over ui.backend.clickhouse.address.
clickhouse.external.port9440Native protocol port, used by the UI backend, the dbctl tool, and the collector exporters. ClickHouse Cloud serves it on 9440 with TLS.
clickhouse.external.httpPort8443HTTP interface port, used by the agent evaluations service. ClickHouse Cloud serves it on 8443 with TLS.
clickhouse.external.tls.enabledtrueConnect with TLS. Required by ClickHouse Cloud.
clickhouse.external.tls.ca""Optional PEM bundle for a private certificate authority, rendered into the generated configuration Secrets as ca.crt. Leave empty for publicly trusted certificates. Certificate verification is never disabled.
clickhouse.external.replicatedfalseThe endpoint is a replicated cluster, so migrations create databases with the Replicated engine and rewrite MergeTree-family table engines to their Replicated counterparts. Leave false for ClickHouse Cloud, which replicates on its own.
clickhouse.external.replicaAddresses[]Per-replica host:port list that bootstraps the schema. Leave empty for operator-managed clusters that synchronize databases across replicas.
clickhouse.external.migrateAddress""Optional host:port of a designated replica for migrations and schema version reads. Set this value when address load-balances across replicas.
ui.backend.database.skipMigrationsfalseVerify the schema at startup instead of applying it, for installations that run schema changes out of band.

Schema initialization

When you install or upgrade the chart, an init container runs a schema management tool (dbctl) that creates the platformdb database and applies all table schemas against your external ClickHouse host. The tool creates and evolves schema only, and does not migrate or move existing data, despite the image and command names. No manual schema setup is required as long as the admin credentials have CREATE DATABASE and CREATE TABLE privileges. Without those privileges, the init container cannot create the schema, so a database administrator must apply it before you install.

To apply the schema changes out of band instead, set ui.backend.database.skipMigrations to true. Startup then verifies the schema instead of applying it, and fails with a message that names the missing work.

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 schema management container directly.

The following examples use the native protocol on port 9000 without TLS. For a TLS endpoint, such as the default external endpoint on port 9440, add --port=9440 and --secure, and add --tls-ca for a private certificate authority.

Note

These commands are provided as a reference and might require adjustments depending on your environment. Verify the flags against the tool version before running in production.

docker run --rm \
  us-docker.pkg.dev/solo-public/solo-enterprise/solo-enterprise-migrations:0.5.6 \
  init --host=<clickhouse-host> --port=9000 --database=platformdb \
  --username=<username> --password=<password>

docker run --rm \
  us-docker.pkg.dev/solo-public/solo-enterprise/solo-enterprise-migrations:0.5.6 \
  migrate-up --host=<clickhouse-host> --port=9000 --database=platformdb \
  --username=<username> --password=<password>

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

To supply the connection details as files instead of flags, use --config-dir. The directory holds one file for each of address, port, database, username, and password, and optional tls and ca.crt files for a TLS endpoint. The Secret that the chart generates carries exactly those keys, so a pod that mounts that Secret needs no connection flags. An explicit flag takes precedence over the file of the same name.

docker run --rm -v <config-directory>:/cfg \
  us-docker.pkg.dev/solo-public/solo-enterprise/solo-enterprise-migrations:0.5.6 \
  init --config-dir /cfg

Troubleshooting

Init container fails with connection refused

Verify that the endpoint that you configured resolves from within the cluster, and that its port is reachable. When clickhouse.external.enabled is true, the endpoint comes from clickhouse.external.address and clickhouse.external.port, which defaults to 9440 with TLS. Otherwise, it comes from ui.backend.clickhouse.address and ui.backend.clickhouse.port, which defaults to 9000. 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=<port> \
  --user=<username> --password=<password> \
  --query="SELECT 1"

For a TLS endpoint, add --secure to the client command.

UI backend fails to start

The connection Secret must contain the keys address, port, database, username, and password, and for a TLS endpoint with a private certificate authority, the keys tls and ca.crt.

The name of the Secret depends on how it was created. A Secret that you created yourself takes the name that you set in ui.backend.clickhouse.secretRef. A Secret that the chart generated takes the default name for your version. For that default, see the Helm values reference on this page. To find the Secret, list the Secrets in the namespace.

kubectl get secret -n solo-enterprise -o name | grep clickhouse

Inspect the Secret that the previous command names, and verify that every key is present.

kubectl get secret <secret-name> -n solo-enterprise -o yaml