Overview
The ClickHouse AI connector gives Rootly AI direct, read-only access to the ClickHouse data your responders use during investigations. Rootly AI can discover databases and tables, inspect column schemas, and run bounded SQL queries against logs, metrics, traces, or other operational data. Rootly calls ClickHouse’s HTTPS interface directly. You don’t need to deploy an MCP server or copy ClickHouse data into Rootly. Queries run on demand, and ClickHouse remains the source of truth.Before You Start
You’ll need:- A public ClickHouse HTTPS endpoint that Rootly can reach.
- A dedicated ClickHouse username and password.
SELECTaccess on only the databases and tables Rootly AI should query.- Permission in Rootly to manage AI connectors.
8443 and looks like https://example.us-east-1.aws.clickhouse.cloud:8443.
Self-hosted deployments must expose a trusted HTTPS endpoint to Rootly. Plain HTTP endpoints, private network addresses, embedded credentials, URL paths, query strings, and fragments are rejected.
Create a Read-Only ClickHouse Account
Run the following statements as a ClickHouse administrator. Replace the database name, username, and password before running them:*.* when possible. Repeat the GRANT SELECT statement for each database Rootly AI needs.
The role mirrors Rootly’s per-request read, time, memory, and thread limits. The readonly = 1 setting blocks data-definition and data-modification queries at the ClickHouse layer. Rootly also sends readonly=1 with every request and rejects mutations, administration statements, settings changes, multiple statements, output formats, and external-network table functions before sending a query.
Verify the account
Test the endpoint and credentials before connecting them to Rootly:curl prompts for the password without placing it in shell history or the process arguments. The command should return 1. Then verify that the account can read an intended table and can’t create one; enter the password at each prompt:
SELECT statements should succeed. The CREATE TABLE statement should fail with a read-only error.
Connect ClickHouse
Open The ClickHouse Card
Enter The Endpoint
https://example.clickhouse.cloud:8443; don’t include a database path or query parameters.Choose The Default Database
Enter The Credentials
Verify The Connection
SELECT 1 with the connector’s read-only settings. The card shows Connected only after ClickHouse authenticates the account and completes the query.Production Observability.SELECT grants.What Rootly AI Can Query
The connector exposes four read-only tools:- “Which services produced the most error spans in the 15 minutes before this incident?”
- “Compare checkout latency by deployment version for the last hour.”
- “Find traces containing this request ID and summarize the failing dependency.”
- “Did log volume or error rate change after the deployment at 14:05 UTC?”
system catalog when the account has access.
Query and Resource Limits
Every query is subject to application and ClickHouse request limits:SET and SETTINGS changes, multiple statements, custom FORMAT clauses, and external-network table functions such as url, s3, http, remote, mysql, and postgresql.
These limits protect investigation context and shared ClickHouse capacity. They aren’t a substitute for ClickHouse quotas or workload controls. Use MAX or CONST settings-profile constraints when a server-side cap must remain authoritative; ClickHouse rejects a request that exceeds the constraint. Use quotas to bound cumulative use across queries. Test the Rootly connection after tightening either control.
Data Handling and Permissions
- On-demand queries. Rootly AI queries ClickHouse only when an investigation or direct question needs the data. The connector doesn’t run a background ingestion job.
- ClickHouse permissions apply. Rootly can only read objects granted to the configured account.
- Defense in depth. Rootly validates query shape and sends read-only, execution, result, memory, and thread settings with every request.
- Encrypted credentials. Rootly encrypts the username and password at rest and excludes them from audit-version payloads.
- Credential cleanup. Disconnecting the AI connector scrubs the stored username and password before soft-deleting the connection.
- AI traces may contain results. Connector responses can appear in Rootly AI’s model and observability traces. See Data Privacy for Rootly AI for retention details.
Managing the Connection
Open the ClickHouse card to update or disconnect it. When editing the connection, leave both credential fields blank to keep the current username and password. If you enter replacement credentials, Rootly verifies them before saving the change. Disconnecting removes the stored credentials and prevents future queries. It doesn’t change the ClickHouse account or delete ClickHouse data. Revoke or delete the ClickHouse account separately if it is no longer needed. If your firewall restricts inbound traffic, add Rootly’s published IP ranges before connecting ClickHouse.Troubleshooting
Rootly can't reach the endpoint
Rootly can't reach the endpoint
8443 for ClickHouse Cloud when it appears in the connection details. Rootly rejects HTTP, private and loopback destinations, embedded credentials, URL paths, query parameters, and fragments. If you restrict inbound traffic, add Rootly’s published IP ranges.ClickHouse rejects the credentials
ClickHouse rejects the credentials
curl check in Verify the account with the same HTTPS origin, username, and password. Confirm that the account uses password authentication and hasn’t been disabled or rotated. When updating Rootly after a rotation, enter both the username and password.Verification succeeds, but table discovery fails
Verification succeeds, but table discovery fails
SELECT 1 confirms connectivity and authentication but doesn’t prove the account can read your data. Grant SELECT on the intended database and its tables. The discovery tools also read system.databases, system.tables, and system.columns; confirm that your ClickHouse policy permits those catalog queries.A query is rejected before it reaches ClickHouse
A query is rejected before it reaches ClickHouse
SELECT, WITH, or EXPLAIN statement without a trailing semicolon or FORMAT clause. Remove settings changes, mutations, DDL, administration commands, and external-network table functions. Rootly rejects these query shapes even if the ClickHouse account could run them.A query times out or returns a truncated result
A query times out or returns a truncated result
Rootly AI can't find recent telemetry
Rootly AI can't find recent telemetry
Frequently Asked Questions
Do I need to run a ClickHouse MCP server?
Do I need to run a ClickHouse MCP server?
Can Rootly AI modify ClickHouse data?
Can Rootly AI modify ClickHouse data?
readonly=1 with each request. Keep the dedicated ClickHouse account read-only as the authoritative server-side control.Can I connect a private ClickHouse cluster?
Can I connect a private ClickHouse cluster?
Can I connect multiple ClickHouse services?
Can I connect multiple ClickHouse services?