From a87b669945392f42e3a988ce113473ff63d9b75d Mon Sep 17 00:00:00 2001 From: Linhe Huo Date: Thu, 23 Dec 2021 16:07:21 +0800 Subject: [PATCH] [TD-12465]: update least supported Grafana to 7.x and plugin to 3.1.3 (#9319) --- documentation20/cn/09.connections/docs.md | 23 +++++++++++-- .../cn/14.devops/01.telegraf/docs.md | 4 +-- .../cn/14.devops/02.collectd/docs.md | 4 +-- documentation20/en/09.connections/docs.md | 32 ++++++++++++++++--- .../en/14.devops/01.telegraf/docs.md | 4 +-- .../en/14.devops/02.collectd/docs.md | 4 +-- 6 files changed, 55 insertions(+), 16 deletions(-) diff --git a/documentation20/cn/09.connections/docs.md b/documentation20/cn/09.connections/docs.md index e2f921cc97..d79d07661b 100644 --- a/documentation20/cn/09.connections/docs.md +++ b/documentation20/cn/09.connections/docs.md @@ -7,11 +7,21 @@ TDengine 能够与开源数据可视化系统 [Grafana](https://www.grafana.com/ ### 安装Grafana -目前 TDengine 支持 Grafana 6.2 以上的版本。用户可以根据当前的操作系统,到 Grafana 官网下载安装包,并执行安装。下载地址如下:https://grafana.com/grafana/download。 +目前 TDengine 支持 Grafana 7.0 以上的版本。用户可以根据当前的操作系统,到 Grafana 官网下载安装包,并执行安装。下载地址如下:。 ### 配置Grafana -TDengine 的 Grafana 插件请从 下载。 +TDengine 的 Grafana 插件托管在GitHub,可从 下载,当前最新版本为 3.1.3。 + +推荐使用 [`grafana-cli` 命令行工具](https://grafana.com/docs/grafana/latest/administration/cli/) 进行插件安装。 + +```bash +sudo -u grafana grafana-cli \ + --pluginUrl https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip \ + plugins install tdengine-datasource +``` + +或者下载到本地并解压到 Grafana 插件目录。 ```bash GF_VERSION=3.1.3 @@ -31,11 +41,18 @@ Grafana 7.3+ / 8.x 版本会对插件进行签名检查,因此还需要在 gra allow_loading_unsigned_plugins = tdengine-datasource ``` +在Docker环境下,可以使用如下的环境变量设置自动安装并设置 TDengine 插件: + +```bash +GF_INSTALL_PLUGINS=https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip;tdengine-datasource +GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=tdengine-datasource +``` + ### 使用 Grafana #### 配置数据源 -用户可以直接通过 localhost:3000 的网址,登录 Grafana 服务器(用户名/密码:admin/admin),通过左侧 `Configuration -> Data Sources` 可以添加数据源,如下图所示: +用户可以直接通过 的网址,登录 Grafana 服务器(用户名/密码:admin/admin),通过左侧 `Configuration -> Data Sources` 可以添加数据源,如下图所示: ![img](../images/connections/add_datasource1.jpg) diff --git a/documentation20/cn/14.devops/01.telegraf/docs.md b/documentation20/cn/14.devops/01.telegraf/docs.md index 485e7038f0..ba1620fd82 100644 --- a/documentation20/cn/14.devops/01.telegraf/docs.md +++ b/documentation20/cn/14.devops/01.telegraf/docs.md @@ -33,8 +33,8 @@ IT 运维监测数据通常都是对时间特性比较敏感的数据,例如 ### 下载 TDengine 插件到 grafana 插件目录 ```bash -1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.1/tdengine-datasource-3.1.1.zip -2. sudo unzip tdengine-datasource-3.1.1.zip -d /var/lib/grafana/plugins/ +1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip +2. sudo unzip tdengine-datasource-3.1.3.zip -d /var/lib/grafana/plugins/ 3. sudo chown grafana:grafana -R /var/lib/grafana/plugins/tdengine 4. echo -e "[plugins]\nallow_loading_unsigned_plugins = tdengine-datasource\n" | sudo tee -a /etc/grafana/grafana.ini 5. sudo systemctl restart grafana-server.service diff --git a/documentation20/cn/14.devops/02.collectd/docs.md b/documentation20/cn/14.devops/02.collectd/docs.md index 0073cf7834..c27da8c6d8 100644 --- a/documentation20/cn/14.devops/02.collectd/docs.md +++ b/documentation20/cn/14.devops/02.collectd/docs.md @@ -32,8 +32,8 @@ IT 运维监测数据通常都是对时间特性比较敏感的数据,例如 ### 复制 TDengine 插件到 grafana 插件目录 ```bash -1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.1/tdengine-datasource-3.1.1.zip -2. sudo unzip tdengine-datasource-3.1.1.zip -d /var/lib/grafana/plugins/ +1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip +2. sudo unzip tdengine-datasource-3.1.3.zip -d /var/lib/grafana/plugins/ 3. sudo chown grafana:grafana -R /var/lib/grafana/plugins/tdengine 4. echo -e "[plugins]\nallow_loading_unsigned_plugins = tdengine-datasource\n" | sudo tee -a /etc/grafana/grafana.ini 5. sudo systemctl restart grafana-server.service diff --git a/documentation20/en/09.connections/docs.md b/documentation20/en/09.connections/docs.md index f5af01d9b1..0e15e58a53 100644 --- a/documentation20/en/09.connections/docs.md +++ b/documentation20/en/09.connections/docs.md @@ -6,25 +6,47 @@ TDengine can be quickly integrated with [Grafana](https://www.grafana.com/), an ### Install Grafana -TDengine currently supports Grafana 6.2 and above. You can download and install the package from Grafana website according to the current operating system. The download address is as follows: - -https://grafana.com/grafana/download. +TDengine currently supports Grafana 7.0 and above. You can download and install the package from Grafana website according to the current operating system. The download address is as follows: . ### Configure Grafana -Download grafana plugin from . +TDengine data source plugin for Grafana is hosted on GitHub, refer to GitHub latest release page to download the latest plugin package. Currently it's version 3.1.3 . + +It is recommended to use [`grafana-cli` command line tool](https://grafana.com/docs/grafana/latest/administration/cli/) to install the plugin. + +```bash +sudo -u grafana grafana-cli \ + --pluginUrl https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip \ + plugins install tdengine-datasource +``` + +Users could manually download the plugin package and install it to Grafana plugins directory. ```bash GF_VERSION=3.1.3 wget https://github.com/taosdata/grafanaplugin/releases/download/v$GF_VERSION/tdengine-datasource-$GF_VERSION.zip ``` -Taking Centos 7.2 as an example, just copy grafanaplugin directory to /var/lib/grafana/plugins directory and restart Grafana. +Taking Centos 7.2 as an example, just unpack the package to /var/lib/grafana/plugins directory and restart Grafana. ```bash sudo unzip tdengine-datasource-$GF_VERSION.zip /var/lib/grafana/plugins/ ``` +Grafana will check the signature after 7.3 and 8.x for security. Users need additional configurations in `grafana.ini` file to allow unsigned plugins like TDengine data source. + +```ini +[plugins] +allow_loading_unsigned_plugins = tdengine-datasource +``` + +In docker/compose/k8s, simply setting the two environment variables will take it all for you. + +```bash +GF_INSTALL_PLUGINS=https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip;tdengine-datasource +GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=tdengine-datasource +``` + ### Use Grafana #### Configure data source diff --git a/documentation20/en/14.devops/01.telegraf/docs.md b/documentation20/en/14.devops/01.telegraf/docs.md index a8b5db08cc..f4270c2f87 100644 --- a/documentation20/en/14.devops/01.telegraf/docs.md +++ b/documentation20/en/14.devops/01.telegraf/docs.md @@ -33,8 +33,8 @@ Please download TDengine 2.3.0.0 or the above version from TAOS Data's [official ### Download TDengine plugin to Grafana plugin's directory ```bash -1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.1/tdengine-datasource-3.1.1.zip -2. sudo unzip tdengine-datasource-3.1.1.zip -d /var/lib/grafana/plugins/ +1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip +2. sudo unzip tdengine-datasource-3.1.3.zip -d /var/lib/grafana/plugins/ 3. sudo chown grafana:grafana -R /var/lib/grafana/plugins/tdengine 4. echo -e "[plugins]\nallow_loading_unsigned_plugins = tdengine-datasource\n" | sudo tee -a /etc/grafana/grafana.ini 5. sudo systemctl restart grafana-server.service diff --git a/documentation20/en/14.devops/02.collectd/docs.md b/documentation20/en/14.devops/02.collectd/docs.md index 15a83d7f0c..3c7dcd2138 100644 --- a/documentation20/en/14.devops/02.collectd/docs.md +++ b/documentation20/en/14.devops/02.collectd/docs.md @@ -32,8 +32,8 @@ Please download TDengine 2.3.0.0 or the above version from TAOS Data's [official ### Download TDengine plugin to Grafana plugin's directory ```bash -1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.1/tdengine-datasource-3.1.1.zip -2. sudo unzip tdengine-datasource-3.1.1.zip -d /var/lib/grafana/plugins/ +1. wget -c https://github.com/taosdata/grafanaplugin/releases/download/v3.1.3/tdengine-datasource-3.1.3.zip +2. sudo unzip tdengine-datasource-3.1.3.zip -d /var/lib/grafana/plugins/ 3. sudo chown grafana:grafana -R /var/lib/grafana/plugins/tdengine 4. echo -e "[plugins]\nallow_loading_unsigned_plugins = tdengine-datasource\n" | sudo tee -a /etc/grafana/grafana.ini 5. sudo systemctl restart grafana-server.service -- GitLab