Configure the ClickHouse connection
In this milestone, you enter the connection details so Grafana Cloud can reach your ClickHouse server. You’ll set the server address, protocol, port, and the read-only credentials you created earlier.
To configure the connection, complete the following steps.
In the Server address field, enter the hostname or IP address of your ClickHouse server.
For example, enter
clickhouse.example.com.For Protocol, select Native for best performance. Choose HTTP instead if your network requires HTTP-based connectivity, for example through a reverse proxy.
In the Server port field, enter the port that matches your protocol. Native uses
9000(or9440with TLS); HTTP uses8123(or8443with TLS).In the Username field, enter the read-only user you created earlier.
For example, enter
grafana_reader.In the Password field, enter the password for your read-only user.
For your security, enter this value yourself rather than having Grafana fill it in.
Your connection details are in place.
Optional settings:
- Secure Connection: If your ClickHouse server uses TLS, enable Secure Connection, then set the Server port to a TLS-enabled port. Grafana doesn’t change the port automatically when you toggle TLS.
- Default database: For self-hosted ClickHouse, set the database you query most often. On ClickHouse Cloud you can leave this blank, because Cloud routes to the correct database. A blank value makes the plugin use the
defaultdatabase, and setting a name that doesn’t exist can cause anUnknown databaseerror.
In the next milestone, you’ll save and test the connection.