This is a Grafana data source plugin built for
GreptimeDB. This plugin is built
on top of original Grafana ClickHouse data source and enhanced for GreptimeDB's
additional features.
Grab the latest release from release page, Unzip the file to your grafana plugin directory.
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource.zip plugins install info8fcc
If there is some error when installing signed version, use unsigned version
you need to set grafana ini file to use unsigned plugin.
allow_loading_unsigned_plugins = info8fcc-greptimedb-datasource
If you are using Grafana inside Docker, you need to export the variable:
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=info8fcc-greptimedb-datasource
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource-unsigned.zip plugins install info8fcc
Note that you may need to restart your grafana server after installing the plugin.
We also build Grafana docker image that includes GreptimeDB datasource by default. To run the docker image:
docker pull greptime/grafana-greptimedb:latest
docker run -p 3000:3000 greptime/grafana-greptimedb:latest
You can log in Grafana by visiting http://localhost:3000. The default username and password are both set to admin.
See our setup guide from our docs.
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.
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. |
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. |
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). |
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. |
Select the Traces
query type when you want to query distributed tracing data.
Main Setting | Description |
---|---|
Trace Model | Select Trace Search to query a list of traces. |
Trace Id Column | Default value: trace_id |
Span Id Column | Default value: span_id |
Parent Span ID Column | Default value: parent_span_id |
Service Name Column | Default value: service_name |
Operation Name Column | Default value: span_name |
Start Time Column | Default value: timestamp |
Duration Time Column | Default value: duration_nano |
Duration Unit | Default value: nano_seconds |
Tags Column | Multiple selections allowed. Corresponds to columns starting with span_attributes (e.g., span_attributes.http.method ). |
Service Tags Column | Multiple selections allowed. Corresponds to columns starting with resource_attributes (e.g., resource_attributes.host.name ). |
Yarn 1.x is required for this project. Execute these commands in code root folder
-
Install dependencies
yarn install
-
Build plugin in development mode and run in watch mode
yarn run dev
-
Build backend plugin binaries for Linux, Windows and Darwin:
mage -v build:linux
-
Start Docker Service
docker compose up
GreptimeDB uses the Apache License 2.0 to strike a balance between open contributions and allowing you to use the software however you want.