Hey Signozians , i've added a password for my loca...
# support
l
Hey Signozians , i've added a password for my local clickhouse in clickhouse-users but the otel-migrator fails to connect to clickhouse ? is there anything else to be done on the otel-collector-config or the docker-compose.yaml ? thank you
a
@Prashant Shahi
p
Hi @L Omary šŸ‘‹ can you share the changes that you have done in the docker-compose and otel-collector config from the default ones?
l
I've added a password in clickhouse-users , that's the only change i've made.
p
okay, you will also need to update the clickhouse password in multiple places. •
ClickHouseUrl
environment in
query-service
in docker-compose YAML
Copy code
ClickHouseUrl=<tcp://usr:pwd@clickhouse:9000>
• clickhouse exporters of
otel-collector
config
Copy code
clickhousetraces:
    datasource: <tcp://usr:pwd@clickhouse:9000/signoz_traces>
  clickhousemetricswrite:
    endpoint: <tcp://usr:pwd@clickhouse:9000/signoz_metrics>
  clickhousemetricswrite/prometheus:
    endpoint: <tcp://usr:pwd@clickhouse:9000/signoz_metrics>
  clickhouselogsexporter:
    dsn: <tcp://usr:pwd@clickhouse:9000/signoz_logs>
    ...
• DSN of
otel-collector-migrator
in docker-compose YAML
Copy code
command:
      - "--dsn=<tcp://usr:pwd@clickhouse:9000>"
šŸ™Œ 1
a
this should be better managed at single place than spread over at multiple places?
l
Thanks @Prashant Shahi this works great , and i guess if the database is different from default it will be like : tcp://usr:pwd@clickhouse:9000/signoz_logs?database=<new database>
p
@L Omary correct
āœ… 1
And right, there is one more place where you will need to update.
prometheus.yml
Copy code
remote_read:
  - url: <tcp://usr:pwd@clickhouse:9000/signoz_metrics>
šŸ‘ 1
^ This will make sure your promql queries work smoothly, if any.
this should be better managed at single place than spread over at multiple places?
we can work on simplifying it to ease out the developer experience - however, for Docker it cannot be at a single place since the prometheus config does not support env variables and involvement of multiple containers envs.
l
I'll have to do it once , i can create a local script to match and replace it now that i know what to change
this is important because you have to be secure by default , and most people that will use that will be insecure and leave their database open : http://demo/?session_timeout=60&output_format_json_quote_64bit_integers=0&enable_http_compression=0&database=signoz_traces&query=select%20*%20from%20distributed_signoz_index_v2%20limit%2020
šŸ‘€ 1
a
@L Omary please reshare the above link. It is incorrect now