hello How do I get access to the clickhouse databa...
# general
o
hello How do I get access to the clickhouse database, I am currently trying to use a python library but it is not working. @Ankit Nayan šŸ‘€ Thanks in advance
Copy code
import clickhouse_connect

client = clickhouse_connect.get_client(
    host='signoz-clickhouse.<namespace>.svc.cluster.local',
    port=8123,
    username='admin',
    password='<password>')
print(client)
a
@oluchi orji where are you trying to connect from? The host path will be accessible only from a container in the same cluster as clickhouse/signoz. Also, I assume you are using
helm
installation of SigNoz?
o
Yes, I am using a helm installation on Amazon EKS and the application is running as a cron job on the same cluster hosting signoz
I have a curious question, if I want to test locally , is it only via the service DNS name I can test @Ankit Nayan? Is there another way
a
you can connect using
Copy code
host='chi-my-release-clickhouse-cluster-0-0.<namespace>.svc.cluster.local'
v
@oluchi orji I think you are missing Database which can be
signoz_logs
or
signoz_metrics
or
signoz_traces
Ignore this as you are using k8s helm charts Also username should be
default
and password is not set and just add empty string
a
username and password are set for helm chart @Vishal Sharma https://github.com/SigNoz/charts/blob/main/charts/signoz/values.yaml#L96-L98
o
Yeah, I am using the default password and username specified on the value file
a
I have a curious question, if I want to test locally , is it only via the service DNS name I can test
I usually port-forward connect to clickhouse svc and connect my script as if clickhouse was running on local
Copy code
kubectl -n <namespace> port-forward svc/my-release-clickhouse 9000:9000
o
Oh, I didn't think of port forwarding, thanks for this , have a good day
thanks @Ankit Nayan, @Vishal Sharma
a
what are you trying to do in the cronjob? I am curious of the use case
o
1. Get. a report for exceptions raised in our applications logs ( especially customer serving) 2. Get a report for runtime errors
a
Interesting. Might be good to build it in the product itself
o
I don't understandšŸ‘€
a
from SigNoz's UI you could download a report
what are runtime errors?
o
ā€¢ E.g panic errors in golang such as Out of bounds array access, Incorrect type assertion ā€¢ in python , using an undefined variable or function name or performing an operation on incompatible types.
a
got it
aren't they same as exceptions?
o
Yeah, maybešŸ˜„
a
šŸ˜„
is the report to be generated a spreadsheet or pdf?
o
spreadsheet at the moment