Skip to main content

Connect to ClickHouse

tip

The easiest way to run SigNoz is to use SigNoz Cloud - no installation, maintenance, or scaling needed.

New users get 30 days of free uncapped usage. Click here to sign up.

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 :)
danger

You are connected to your production database, proceed with caution!