Plugins 〉GreptimeDB
The GreptimeDB plugin has been deprecated and is no longer maintained.
GreptimeDB
GreptimeDB data source
GreptimeDB datasource for grafana
This plugin is currently campatiable with GreptimeDB 0.3.1 and GreptimeCloud.
This plugin currently only supports querying through SQL.
Learn more about GreptimeDB Github | Website
Using GreptimeDB in Grafana
Install GreptimeDB
GreptimeCloud
Visit https://greptime.com/product/cloud for more details.
Manually
Get GreptimeDB from Greptime's release page here.
This plugin is currently campatiable with GreptimeDB 0.3.1.
For demostration, run it in standalone mode ./greptime standalone start
. In case of port conflicts, start with option -c <config.toml>
. The format of config.toml
can be found here
Docker
There are also some docker images available on Docker Hub.
You can start a GreptimeDB instance with docker like this:
docker run -p 4000-4004:4000-4004 \
-p 4242:4242 \
-v "greptime-vol:/tmp/greptimedb" \
--name greptime \
greptime/greptimedb:0.3.1 standalone start
Add GreptimeDB data source in Grafana
Add a new data source in grafana, and select GreptimeDB.
Make sure you have provided a correct database name. If you use greptimecloud, also remember to enable basic auth in the Auth section, then enter your username and password.
Then click Save & test
. It will query numbers from your GreptimeDB to check if the data source is available. If the test result shows Success, you have successfully added your GreptimeDB as Grafana data source!
Visualize your data
If you are a new to GreptimeDB, you may need some dummy data for testing.
First, let's create a time-series table in GreptimeDB. GreptimeDB supports execute sql from HTTP API. You can use curl
to execute sql.
curl http://localhost:4000/v1/sql -d "sql=
CREATE TABLE system_metrics (
host STRING,
idc STRING,
cpu_util DOUBLE,
memory_util DOUBLE,
disk_util DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(host, idc),
TIME INDEX(ts))"
I have written a bash script for you to insert some dummy data.
sql="INSERT INTO system_metrics VALUES"
for i in {1..20}; do
host=“host$(echo $i%3 | bc)”
idc=“idc$(echo $i%3 | bc)”
cpu_util=$(echo “scale=2; $RANDOM/327.67” | bc)
memory_util=$(echo “scale=2; $RANDOM/327.67” | bc)
disk_util=$(echo “scale=2; $RANDOM/327.67” | bc)
ts=$(echo “$(date -d “-$i minute” +%s) * 1000” | bc)
sql="$sql (’$host’, ‘$idc’, $cpu_util, $memory_util, $disk_util, $ts)"
if [ $i -lt 20 ]; then
sql="$sql,"
fi
done
curl http://localhost:4000/v1/sql -d “sql=$sql”
Go back to Grafana, create a new panel, select your metrics in the query area of your panel and watch the visualization happen!
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
.h4 . .mb-0 }
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Installing GreptimeDB on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Data Source
Use the grafana-cli tool to install GreptimeDB from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Configure the Data Source
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section.
Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box.
To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Changelog
0.1.0
Added visual editor, which supports FROM
SELECT
WHERE
0.2.0
Added more features to the visual editor, including GROUP BY
, Aggregate Function
for SELECT
0.2.1
Auto detect time column after table changes. Added detailed error message.
0.2.2
More detailed user guide.
0.2.3
Added a time filter that automatically adds a WHERE
clause to the query depending on the time range selected in the dashboard.
0.2.4
Documentation improvements
Update grafanaDependency to ">=9.0.0" to make this plugin install-able in other grafana version.
0.2.5
Add support of authentication
Now campatiable with GreptimeDB 0.3.1 and Greptime Cloud