Connect to ClickHouse

Self-Host - This page applies to self-hosted SigNoz editions.

Follow the instructions below for connecting to your ClickHouse database:

For Docker Users

  1. To exec to clickhouse container:

    docker exec -it signoz-clickhouse bash
    

Inside the bash shell, run the following to create clickhouse client:

clickhouse client

Output should be similar to this:

ClickHouse client version 22.4.5.9 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.4.5 revision 54455.

5c6e8128ba12 :)

For Docker Swarm Users

To exec to clickhouse container:

docker exec -it $(docker ps -q -f name=signoz_clickhouse) bash

Inside the bash shell, run the following to create clickhouse client:

clickhouse client

Output should be similar to this:

ClickHouse client version 22.4.5.9 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.4.5 revision 54455.

5c6e8128ba12 :)

For Kubernetes Users

To exec to clickhouse pod:

kubectl -n platform exec -i --tty pod/chi-signoz-cluster-0-0-0 -- bash

Inside the bash shell, run the following to create clickhouse client:

clickhouse client

Output should be similar to this:

ClickHouse client version 22.4.5.9 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.4.5 revision 54455.

5c6e8128ba12 :)

Last updated: June 06, 2024

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.

On this page

Is this page helpful?

Your response helps us improve this page.