Grafana
GreptimeDB can be configured as a Grafana data source. You have the option to connect GreptimeDB with Grafana using one of three data sources: GreptimeDB, Prometheus, or MySQL.
GreptimeDB data source plugin
The GreptimeDB data source plugin is based on the ClickHouse data source and adds GreptimeDB-specific features. The plugin adapts perfectly to the GreptimeDB data model, thus providing a better user experience. In addition, it also solves some compatibility issues compared to using the Prometheus data source directly.
Installation
The plugin is not published in the Grafana plugin catalog, so install the unsigned archive and
allow it explicitly in grafana.ini:
[plugins]
allow_loading_unsigned_plugins = info8fcc-greptimedb-datasource
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS is the equivalent environment variable. Grafana Cloud
does not accept unsigned plugins, so use a self-hosted Grafana. If you need a signed build bound to
your own Grafana root_url, contact us.
Make sure Grafana is installed and running before installing the plugin.
You can choose one of the following installation methods:
- Download
info8fcc-greptimedb-datasource-unsigned.zipfrom the release page and unzip it to your grafana plugin directory. - Use grafana cli to download and install:
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource-unsigned.zip plugins install info8fcc - Use our prebuilt Grafana docker
image, which ships the
plugin by default:
docker run -p 3000:3000 greptime/grafana-greptimedb:latest
Note that you may need to restart your grafana server after installing the plugin.
Connection settings
Click the Add data source button and select GreptimeDB as the type.

Fill in the following URL in the GreptimeDB server URL:
http://<host>:4000
In the Auth section, click basic auth, and fill in the username and password for GreptimeDB in the Basic Auth Details section (not set by default, no need to fill in).
- User:
<username> - Password:
<password>
Then click the Save & Test button to test the connection.
General Query Settings
Before selecting any query type, you first need to configure the Database and Table to query from.
| Setting | Description |
|---|---|
| Database | Select the database you want to query. |
| Table | Select the table you want to query from. |

Table Query
Choose the Table query type when your query results do not include a time column. This is suitable for displaying tabular data.
| Setting | Description |
|---|---|
| Columns | Select the columns you want to retrieve. Multiple selections are allowed. |
| Filters | Set conditions to filter your data. |

Metrics Query
Select the Time Series query type when your query results include both a time column and a numerical value column. This is ideal for visualizing metrics over time.
| Main Setting | Description |
|---|---|
| Time | Select the time column. |
| Columns | Select the numerical value column(s). |

Logs Query
Choose the Logs query type when you want to query log data. You'll need to specify a Time column and a Message column.
| Main Setting | Description |
|---|---|
| Time | Select the timestamp column for your logs. |
| Message | Select the column containing the log content. |
| Log Level | (Optional) Select the column representing the log level. |
