Guides
Connecting Tools
Connect Grafana, DBeaver, and other ClickHouse-compatible tools to your data.
TrailStack exposes the ClickHouse HTTP interface. Any tool that supports ClickHouse over HTTP works.
Connection details
Every tool needs the same four values from your Space's Connection details section:
| Setting | Value |
|---|---|
| Host | api.trailstack.io |
| Port | 8443 |
| Database | Your Space's ClickHouse database |
| Username | Your Space's ClickHouse username |
| Password | Your Space's ClickHouse password |
Protocol: HTTPS (TLS required). All connections use the ClickHouse HTTP interface on port 8443.
Grafana
- Install the ClickHouse plugin from the Grafana plugin catalog.
- Go to Connections → Data sources → Add data source → ClickHouse.
- Configure:
| Field | Value |
|---|---|
| Server address | api.trailstack.io |
| Server port | 8443 |
| Protocol | HTTP |
| TLS/SSL | On |
| Username | Your ClickHouse username |
| Password | Your ClickHouse password |
| Default database | Your ClickHouse database |
- Click Save & Test. You should see "Data source is working."
Example panel query:
SELECT
toStartOfHour(time) AS hour,
count() AS events
FROM evt_page_view
WHERE time > now() - INTERVAL 24 HOUR
GROUP BY hour
ORDER BY hourDBeaver
- Database → New Database Connection → ClickHouse.
- Configure:
| Field | Value |
|---|---|
| Host | api.trailstack.io |
| Port | 8443 |
| Database | Your ClickHouse database |
| Username | Your ClickHouse username |
| Password | Your ClickHouse password |
| SSL | On (check "Use SSL" in Driver properties) |
- Click Test Connection, then Finish.
curl
For one-off queries from the terminal:
curl -X POST 'https://api.trailstack.io:8443?database=<your-database>' \
-u '<your-username>:<your-password>' \
-d "SELECT count() FROM all_events FORMAT Pretty"AI assistants
Claude Desktop and Cursor can query your data in plain English via the ClickHouse MCP server. See AI/MCP Setup for configuration.