Last update: 2025-12-17T09:59:55.000Z
Content:
---
title: "Connect Grafana to Tinybird · Tinybird Docs"
theme-color: "#171612"
description: "This guide covers the steps to connect Grafana to Tinybird using Altinity and ClickHouse plugins, enabling the visualization of Tinybird data within Grafana."
inkeep:version: "forward"
---




# Connect Grafana to Tinybird [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#connect-grafana-to-tinybird)

Copy as MD 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:

- **[  ClickHouse® plugin](https://grafana.com/grafana/plugins/grafana-clickhouse-datasource/)**
- **[  Altinity plugin](https://grafana.com/grafana/plugins/vertamedia-clickhouse-datasource/)**

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](https://www.tinybird.co/templates/tinybird-org-metrics).
And if you want to connect regular API Endpoints and not Data Sources you can use Infinity data source plugin for Grafana.

## Prerequisites [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#prerequisites)

- A Tinybird workspace
- A Grafana instance (local or cloud)
- A Tinybird Auth Token with scopes `WORKSPACE:READ_ALL`   and optionally `ORG_DATASOURCES:READ`   . See[  how to create it](../clickhouse-interface#auth-token-requirements)  .

## Install the ClickHouse® plugin [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#install-the-clickhouse-plugin)

Install one of the ClickHouse® plugins in your Grafana instance:

1. **  ClickHouse® plugin**   - The official ClickHouse® plugin for Grafana
2. **  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 [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#configure-the-clickhouse-plugin)

If you're using the official ClickHouse® plugin:

1. Go to**  Configuration**   >**  Data Sources**   in Grafana
2. Select**  Add data source**   and select**  ClickHouse®**
3. Configure the connection with these settings:

Server address: clickhouse.tinybird.co # your host with 'clickhouse' subdomain instead of 'api', like clickhouse.eu-west-1.aws.tinybird.co
Server port: 443
Protocol: HTTP
Secure Connection: yes See the list of [ClickHouse hosts](../clickhouse-interface#clickhouse-interface-hosts) to find the correct one for your region.

1. Add your authentication credentials:

Username: <WORKSPACE_NAME> # not used for auth, helps you identify the connection
Password: <TOKEN> # your Tinybird Auth Token
1. Select**  Save & Test**   to verify the connection



<-figure->
![ClickHouse® plugin configuration](/docs/_next/image?url=%2Fdocs%2Fimg%2Fgrafana-plugin-1.png&w=3840&q=75)

<-figcaption->
ClickHouse® plugin configuration

</-figcaption->


</-figure->
## Configure the ClickHouse® plugin for OpenTelemetry [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#configure-the-clickhouse-plugin-for-opentelemetry)

Use the [OpenTelemetry template](https://tinybird.co/templates/opentelemetry) to build an end to end observability solution with OpenTelemetry and Tinybird.

This section assumes you have the OpenTelemetry template deployed in a Tinybird Workspace.

Once you've configured the ClickHouse plugin, edit the Grafana Data Source. You'll see the `Logs` and `Traces` configurations. Check the `Use OTel` checkboxes and set your Tinybird workspace name as `Default database`.



<-figure->
![ClickHouse® plugin configuration for OpenTelemetry](/docs/_next/image?url=%2Fdocs%2Fimg%2Fgrafana-plugin-3.png&w=3840&q=75)

<-figcaption->
ClickHouse® plugin configuration for OpenTelemetry

</-figcaption->


</-figure->
From the `Dashboards` tab, you can import the `Simple ClickHouse OTel dashboard` as a starting point to analyze your OpenTelemetry logs and traces.



<-figure->
![ClickHouse® plugin configuration for OpenTelemetry](/docs/_next/image?url=%2Fdocs%2Fimg%2Fgrafana-plugin-4.png&w=3840&q=75)

<-figcaption->
ClickHouse® OTel dashboard

</-figcaption->


</-figure->
You can add and edit visualization panels by writing new SQL queries to analyze your logs, metrics and traces.



<-figure->
![ClickHouse® plugin configuration for OpenTelemetry](/docs/_next/image?url=%2Fdocs%2Fimg%2Fgrafana-plugin-6.png&w=3840&q=75)

<-figcaption->
ClickHouse® Simple OTel dashboard

</-figcaption->


</-figure->
Use the `Explore` feature in Grafana to filter and analyze your OpenTelemetry logs:



<-figure->
![ClickHouse® plugin configuration for OpenTelemetry](/docs/_next/image?url=%2Fdocs%2Fimg%2Fgrafana-plugin-5.png&w=3840&q=75)

<-figcaption->
OpenTelemetry logs explorer

</-figcaption->


</-figure->
### Provisioning the ClickHouse data source [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#provisioning-the-clickhouse-data-source)

You can also provision the ClickHouse data source using a YAML file, which is useful for managing your Grafana configuration as code.

This snippet uses the following environment variables, which you must set before applying it:

- `TINYBIRD_WORKSPACE_NAME`   : Your workspace name
- `TINYBIRD_TOKEN`   : A scoped or admin token
- `TINYBIRD_CLICKHOUSE_HOST`   : Your ClickHouse HTTP interface host

See the list of [ClickHouse hosts](../clickhouse-interface#clickhouse-interface-hosts) to find the correct one for your region.

apiVersion: 1

datasources:
  - name: Tinybird OTel Cloud
    uid: tinybird-otel-cloud
    type: grafana-clickhouse-datasource
    access: proxy
    editable: true
    isDefault: false
    jsonData:
      defaultDatabase: ${TINYBIRD_WORKSPACE_NAME}
      host: ${TINYBIRD_CLICKHOUSE_HOST}
      logs:
        contextColumns: []
        defaultDatabase: ${TINYBIRD_WORKSPACE_NAME}
        defaultTable: otel_logs
        otelEnabled: true
        otelVersion: latest
        selectContextColumns: true
      pdcInjected: false
      port: 443
      protocol: http
      secure: true
      tlsSkipVerify: false
      traces:
        defaultDatabase: ${TINYBIRD_WORKSPACE_NAME}
        defaultTable: otel_traces
        durationUnit: nanoseconds
        otelEnabled: true
        otelVersion: latest
      useOtel: true
      username: otel
      version: 4.10.2
    secureJsonData:
      password: ${TINYBIRD_TOKEN}
## Configure the Altinity plugin [¶](https://www.tinybird.co/docs/forward/work-with-data/publish-data/guides/connect-grafana#configure-the-altinity-plugin)

If you're using the Altinity plugin:

1. Go to**  Configuration**   >**  Data Sources**   in Grafana
2. Select**  Add data source**   and select**  Altinity plugin for ClickHouse®**
3. Configure the connection with these settings: