Plugins 〉TDengine
TDengine
Grafana Plugin for TDengine
TDengine is open-sourced big data platform under GNU AGPL v3.0, designed and optimized for the Internet of Things (IoT), Connected Cars, Industrial IoT, and IT Infrastructure and Application Monitoring, developed by TDengine.
TDengine data source plugin is developed for Grafana. This document explains how to install and configure the data source plugin, and use it as a time-series database. We'll take a look at the data source options, variables, querying, and other options specific to this data source.
Usage
At first, please refer to Add a data source for instructions on how to add a data source to Grafana. Note that, only users with the organization admin role can add data sources.
Add Data Source
Point to Configurations -> Data Sources menu and then Add data source button.
Search and choose TDengine.
If TDengine is not in the list, please check the installation instructions for allowing loading unsigned plugins.
Configure TDengine data source.
Save and test it, it should say 'TDengine Data source is working'.
Import Dashboard
Point to + / Create - import (or /assets/import
url).
Now you can import dashboard with JSON file or grafana dashboard id (please make sure your network is public to https://grafana.com).
Here is the first grafana dashboard you want to use for TDengine, the grafana dashboard id is 15146
.
After load:
After import:
Alert Feature
Now TDengine data source plugin provides basic alert feature support by backend plugin since version 3.1.0
. But it has some known limits currently:
- The sql statement only supports two variables:
$from
and$to
. - When using grafana's alert function, you must use
SQL
as theType
option. That means, arithmetic expression will not work as you expected for alert. - In addition, only
ALIAS BY
andINPUT SQL
are valid. So alert does not work if you requires the time-shift feature.
We've published a dashboard (15155) for you to under stand how alert working.
Here is the details:
First, you should have a notification channel, if no, add a new one in http://localhost:3000/alerting/notification/new(here we use AlertManager for test, we also provides a webhook example here, in webhook/
directory)
Second, set the alert query in panel like this:
Config the alert rule and notifications:
Test it with Test rule button, it should return firing: true
:
In alert manager dashboard, you could see the alert:
Monitor TDengine Database with TDengine Data Source Plugin
See How to Monitor TDengine Cluster with Grafana for the details.
TDinsight
TDinsight is a simple monitoring solution for TDengine database. See TDinsight README for the details.
Docker Stack
For a quick look and test, you can use docker-compose
to start a full Grafana + AlertManager + Alert Webhook stack:
docker-compose up -d
Services:
- Grafana: http://localhost:3000
- AlertManager: http://localhost:9093, in docker it's http://alertmanager:9010/sms
- Webhook: http://localhost:9010/sms, in docker it's http://webhook:9010/sms
Dashboards
You can get other dashboards in the examples directory, or search in grafana with TDengine datasource https://grafana.com/grafana/dashboards/?orderBy=downloads&direction=desc&dataSource=tdengine-datasource .
Here is a short list:
You could open a pr to add one if you want to share your dashboard with TDengine community, we appreciate your contribution!
Grafana Cloud Pro
- $25 / user / month and includes a free trial for new users
- Available with a Grafana Cloud Pro plan
- Access to 1 Enterprise plugin
- Fully managed service (not available to self-manage)
Grafana Cloud Advanced / Grafana Enterprise
- Available with a Grafana Cloud Advanced plan or Grafana Enterprise license
- Access to all Enterprise plugins
- Run fully managed or self-manage on your own infrastructure
Installing TDengine 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.
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 TDengine 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.