Connect Grafana to Tinybird¶
Grafana can connect to Tinybird using ClickHouse® plugins, taking advantage of Tinybird's ClickHouse® HTTP protocol compatibility.
This guide covers how to set up Grafana with Tinybird using two popular ClickHouse® plugins:
The ClickHouse® connection to Tinybird is read-only. You can use it to visualize data from your Tinybird data sources, but you cannot modify data through this connection.
Remember you can expose metrics like API Endpoints in Prometheus format. See an example.
And if you want to connect regular API Endpoints and not Data Sources you can use Infinity data source plugin for Grafana.
Prerequisites¶
- A Tinybird workspace
- A Grafana instance (local or cloud)
- A Tinybird Auth Token with read permissions for the workspace data sources, and Organization data sources.
Install the ClickHouse® plugin¶
Install one of the ClickHouse® plugins in your Grafana instance:
- ClickHouse® plugin - The official ClickHouse® plugin for Grafana
- Altinity plugin - developed by Vertamedia, maintaned by Altinity since 2020
Select one based on your needs and install it through the Grafana plugin catalog or using grafana-cli.
Configure the ClickHouse® plugin¶
If you're using the official ClickHouse® plugin:
- Go to Configuration > Data Sources in Grafana
- Select Add data source and select ClickHouse®
- Configure the connection with these settings:
Server address: <HOST> # your host with 'clickhouse' subdomain instead of 'api', like clickhouse.eu-west-1.aws.tinybird.co Server port: 443 Protocol: HTTP Secure Connection: yes
- Add your authentication credentials:
Username: <WORKSPACE_NAME> # not used for auth, helps you identify the connection Password: <TOKEN> # your Tinybird Auth Token
- Select Save & Test to verify the connection

Configure the Altinity plugin¶
If you're using the Altinity plugin:
- Go to Configuration > Data Sources in Grafana
- Select Add data source and select Altinity plugin for ClickHouse®
- Configure the connection with these settings:
URL: https://<HOST> # your host with 'clickhouse' subdomain instead of 'api', like https://clickhouse.eu-west-1.aws.tinybird.co Access: Server
- Select Basic auth and add credentials:
User: <WORKSPACE_NAME> # not used for auth, helps you identify the connection Password: <TOKEN> # your Tinybird Auth Token
- Select Save & Test to verify the connection

Test the connection¶
Once configured, test your connection by creating a simple query:
- Create a new dashboard and add a panel
- Select your newly created data source
- Write a simple query to test the connection
If the connection is working, you should see the result.
Databases and tables¶
The SQL API exposes four databases: organization, system, tinybird, and workspace name:
- organization: for the Organization data sources, like
organization.workspaces
,organization.pipe_stats_rt
- system: for
system.tables
,system.columns
- tinybird: for the Workspace Service data sources like
tinybird.datasources_ops_log
,tinybird.pipe_stats_rt
- your workspace name: for your Workspace data sources.
Next steps¶
- Explore Grafana's visualization options with your Tinybird data
- Set up alerts based on your real-time data
- Create dashboards that combine data from multiple sources
- Use Grafana variables to make your dashboards interactive
Troubleshooting¶
Connection failed: Verify that your Auth Token has read permissions and that the host URL is correct for your region.
Query timeout: For large datasets, consider using Materialized Views or adding appropriate filters to your queries.
Authentication errors: Double-check that your Auth Token is correct and that you've entered it into the Password field.
Write operations fail: Remember that the ClickHouse® connection to Tinybird is read-only. You cannot use it to insert, update, or delete data.