https://signoz.io logo
#support
Title
# support
h

Hoàng Hải

08/11/2023, 10:09 AM
I'm using helm values as
Copy code
externalClickhouse:
      host: 
      httpPort: 8123
      tcpPort: 9000
      secure: false
      user: 
      password: 
      cluster: sre
but I have an error with signoz-otel-collector
Copy code
time="2023-08-11T10:02:43Z" level=info msg="Executing:\nCREATE DATABASE IF NOT EXISTS signoz_metrics ON CLUSTER cluster\n" component=clickhouse
2023/08/11 10:02:43 Error creating clickhouse client: code: 170, message: Requested cluster 'cluster' not found
I can see my env in signoz-otel-collector is correct with "CLICKHOUSE_CLUSTER : sre". but it is not work. Please use it in your code https://github.com/SigNoz/signoz-otel-collector/blob/main/exporter/clickhousemetricsexporter/clickhouse.go I hope I can use multi signoz with multi clusters in clickhouse
s

Shivanshu Raj Shrivastava

08/11/2023, 11:06 AM
Hey, I see cluster is hardcoded atm https://github.com/SigNoz/signoz-otel-collector/blame/main/exporter/clickhousemetricsexporter/clickhouse.go#L47 Setting env
CLICKHOUSE_CLUSTER
doesn't have any effect as it is not read by collector, and hence you're facing the problem To make it work, use
cluster
for your clickhouse cluster name.
h

Hoàng Hải

08/12/2023, 4:35 AM
I can see that. But I need to use multi signoz, that mean I need to create multi clickhouse “cluster”. It is so crazy, My expect is signoz of A team use clickhouse cluster A and signoz of B team use clickhouse cluster B. Then I can operate all clickhouse cluster easier. An other solution is change database name of signoz. But I see it is hardcoded with
signoz-logs
database as this issues: https://github.com/SigNoz/signoz-otel-collector/issues/165
p

Prashant Shahi

08/14/2023, 9:42 AM
You can find more about prerequisites for External Clickhouse in the docs below: https://signoz.io/docs/operate/clickhouse/external-clickhouse/#prerequisites