ClickHouse

ClickHouse is an open-source column-oriented database management system designed to handle high-volume data workloads and provide fast query performance. Metaplane monitors the data within your ClickHouse instance so you can be the first to know of potential data bugs.

Provisioning Access

Create user

As an administration, execute the following SQL commands to create a role, a user assigned to that group, and permissions to access system tables with schema and freshness metadata.

Make sure to generate a secure password and store it securely — you'll save it into Metaplane later.

-- create a new role named 'metaplane_role'
CREATE OR REPLACE ROLE metaplane_role;

-- grant access to system tables
GRANT SELECT ON system.databases TO metaplane_role;
GRANT SELECT ON system.tables TO metaplane_role;
GRANT SELECT ON system.columns TO metaplane_role;
GRANT SELECT ON system.parts TO metaplane_role;

-- grant access to all tables in 'database_name'
GRANT SELECT ON <database_name>.* TO metaplane_role;

-- grant access to specified table 'table_name' in 'database_name'
GRANT SELECT ON <database_name>.<table_name> TO metaplane_role;

-- create or replace the user 'new_user' with the role 'new_role'
CREATE OR REPLACE USER metaplane_user
WITH PASSWORD '<password>'
DEFAULT ROLE metaplane_role;

Adding ClickHouse source

To add a source, navigate to the Connections page, click on the + Add Connection button on the top right, then click the ClickHouse button. A modal will prompt you for the credentials you just created, then allow you to save the connection for testing.

  • Metaplane supports both SSH and Reverse SSH tunnel setups. Use the checkbox in the modal shown below to use either option.
  • Note: HTTP is Clickhouse's default protocol with port 8123. If you choose to enable HTTPS, the default port value is 8443.

Whitelist Metaplane IPs

If you use IP whitelisting to restrict ClickHouse access, you will need to whitelist the following IPs:

  • 44.197.96.121/32
  • 34.206.79.174/32
  • 107.22.42.246/32

If you use a configuration file to whitelist IPs, you can add the IP addresses to the <listen_host> parameter in the configuration file:

<listen_host>44.197.96.121/32</listen_host>
<listen_host>34.206.79.174/32</listen_host>
<listen_host>107.22.42.246/32</listen_host>

After modifying the configuration file, you will need to restart the ClickHouse server for the changes to take effect.