TrailStack Docs
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:

SettingValue
Hostapi.trailstack.io
Port8443
DatabaseYour Space's ClickHouse database
UsernameYour Space's ClickHouse username
PasswordYour Space's ClickHouse password

Protocol: HTTPS (TLS required). All connections use the ClickHouse HTTP interface on port 8443.

Grafana

  1. Install the ClickHouse plugin from the Grafana plugin catalog.
  2. Go to Connections → Data sources → Add data source → ClickHouse.
  3. Configure:
FieldValue
Server addressapi.trailstack.io
Server port8443
ProtocolHTTP
TLS/SSLOn
UsernameYour ClickHouse username
PasswordYour ClickHouse password
Default databaseYour ClickHouse database
  1. 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 hour

DBeaver

  1. Database → New Database Connection → ClickHouse.
  2. Configure:
FieldValue
Hostapi.trailstack.io
Port8443
DatabaseYour ClickHouse database
UsernameYour ClickHouse username
PasswordYour ClickHouse password
SSLOn (check "Use SSL" in Driver properties)
  1. 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.

On this page