Connect to ClickHouse
Follow the instructions below for connecting to your clickhouse database:
Docker​
- To exec to
clickhouse
container:
docker exec -it clickhouse-setup_clickhouse_1 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 :)
Docker Swarm​
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 :)
Kubernetes​
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 :)
warning
You are connected to your production database, proceed with caution!