logoSemaphor

ClickHouse

Connect Semaphor to your ClickHouse instance

Prerequisites

Before you connect Semaphor to ClickHouse, ensure the following requirements are met.

Database Permissions

  • The user must have read access to the necessary tables.
  • The user must be able to query information_schema table to retrieve metadata.

Required Permissions

To fetch metadata (such as column names and types), your database user must have the following privilege:

GRANT SELECT(column_name, data_type, table_catalog, table_name) ON information_schema.columns

Without this, you may see an ACCESS_DENIED error when trying to run queries or introspect schemas.

Connecting to ClickHouse

To connect Semaphor to your ClickHouse instance, use a connection string in the following format.

Connection String Format

Connection String
clickhousedb://username:password@host:port/database
  • username – Your database username.
  • password – The corresponding password.
  • host – The hostname or IP address of your ClickHouse instance.
  • port - Your database port. If not specified, the default port (8443) will be used.
  • database - Your target database. This is necessary since Clickhouse connector doesn't support multi-line SQL statements. Ex. use mydatabase; select * from table.

Example Connection String

If your ClickHouse user is default, your password is mypassword, and your host is instance.us-east-1.aws.clickhouse.cloud, your connection string will be:

Connection String
clickhousedb://default:mypassword@instance.us-east-1.aws.clickhouse.cloud

Network Access

  • If your database is private, whitelist the Semaphor IP: 44.199.53.142 to allow connections.
  • Make sure your firewall rules and security groups allow inbound connections from Semaphor.

Troubleshooting

If you encounter issues connecting to Clickhouse, review the following:

  • Invalid Credentials: Verify your username and password.
  • Network Restrictions: Confirm that your server accepts connections from Semaphor’s IP address.
  • Incorrect Connection String: Double-check that your connection string matches the required format.
  • Database Permissions: Make sure your database user has permission to query the necessary tables and metadata.

If you continue to experience issues, contact Semaphor Support for assistance.

On this page