docs: update grafana and tdinsight docs (#19842)

* docs: update grafana and tdinsight docs

* fix: typo

---------

Co-authored-by: Shuduo Sang <sangshuduo@gmail.com>
This commit is contained in:
sunpeng 2023-02-07 18:18:50 +08:00 committed by GitHub
parent 8659c21beb
commit 1d483fd503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 30 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -326,11 +326,12 @@ Currently, only the number of logins per minute is reported.
Support monitoring taosAdapter request statistics and status details. Includes. Support monitoring taosAdapter request statistics and status details. Includes.
1. **http_request_inflight**: number of real-time requests. 1. **Http Request Total**: number of total requests.
2. **http_request_total**: number of total requests. 2. **Http Request Fail**: number of failed requests.
3. **http_request_fail**: number of failed requets. 3. **CPU Used**: CPU usage of taosAdapter.
4. **CPU Used**: CPU usage of taosAdapter. 4. **Memory Used**: Memory usage of taosAdapter.
5. **Memory Used**: Memory usage of taosAdapter. 5. **Http Request Inflight**: number of real-time requests.
6. **Http Status Code**: taosAdapter http status code.
## Upgrade ## Upgrade

View File

@ -156,13 +156,13 @@ You can setup a zero-configuration stack for TDengine + Grafana by [docker-compo
services: services:
tdengine: tdengine:
image: tdengine/tdengine:2.6.0.2 image: tdengine/tdengine:3.0.2.4
environment: environment:
TAOS_FQDN: tdengine TAOS_FQDN: tdengine
volumes: volumes:
- tdengine-data:/var/lib/taos/ - tdengine-data:/var/lib/taos/
grafana: grafana:
image: grafana/grafana:8.5.6 image: grafana/grafana:9.3.6
volumes: volumes:
- ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml - ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
- grafana-data:/var/lib/grafana - grafana-data:/var/lib/grafana
@ -197,11 +197,18 @@ As shown above, select the `TDengine` data source in the `Query` and enter the c
- INPUT SQL: Enter the desired query (the results being two columns and multiple rows), such as `select _wstart, avg(mem_system) from log.dnodes_info where ts >= $from and ts < $to interval($interval)`. In this statement, $from, $to, and $interval are variables that Grafana replaces with the query time range and interval. In addition to the built-in variables, custom template variables are also supported. - INPUT SQL: Enter the desired query (the results being two columns and multiple rows), such as `select _wstart, avg(mem_system) from log.dnodes_info where ts >= $from and ts < $to interval($interval)`. In this statement, $from, $to, and $interval are variables that Grafana replaces with the query time range and interval. In addition to the built-in variables, custom template variables are also supported.
- ALIAS BY: This allows you to set the current query alias. - ALIAS BY: This allows you to set the current query alias.
- GENERATE SQL: Clicking this button will automatically replace the corresponding variables and generate the final executed statement. - GENERATE SQL: Clicking this button will automatically replace the corresponding variables and generate the final executed statement.
- Group by column name(s): `group by` or `partition by` columns name split by comma. By setting `Group by column name(s)`, it can show multi-dimension data if Sql is `group by` or `partition by`. Such as, it can show data by `dnode_ep` if sql is `select _wstart as ts, avg(mem_system), dnode_ep from log.dnodes_info where ts>=$from and ts<=$to partition by dnode_ep interval($interval)` and `Group by column name(s)` is `dnode_ep`.
- Format to: format legend for `group by` or `partition by`. Such as it can display series data by `dnode_ep` if sql is `select _wstart as ts, avg(mem_system), dnode_ep from log.dnodes_info where ts>=$from and ts<=$to partition by dnode_ep interval($interval)` and `Group by column name(s)` is `dnode_ep` and `Format to` is `mem_system_{{dnode_ep}}`.
Follow the default prompt to query the average system memory usage for the specified interval on the server where the current TDengine deployment is located as follows. Follow the default prompt to query the average system memory usage for the specified interval on the server where the current TDengine deployment is located as follows.
![TDengine Database TDinsight plugin create dashboard 2](./grafana/create_dashboard2.webp) ![TDengine Database TDinsight plugin create dashboard 2](./grafana/create_dashboard2.webp)
查询每台 TDengine 服务器指定间隔系统内存平均使用量如下.
The example to query the average system memory usage for the specified interval on each server as follows.
![TDengine Database TDinsight plugin create dashboard 2](./grafana/create_dashboard3.webp)
> For more information on how to use Grafana to create the appropriate monitoring interface and for more details on using Grafana, refer to the official Grafana [documentation](https://grafana.com/docs/). > For more information on how to use Grafana to create the appropriate monitoring interface and for more details on using Grafana, refer to the official Grafana [documentation](https://grafana.com/docs/).
### Importing the Dashboard ### Importing the Dashboard

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -345,11 +345,12 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源的使用情况和状态,
支持监控 taosAdapter 请求统计和状态详情。包括: 支持监控 taosAdapter 请求统计和状态详情。包括:
1. **http_request_inflight**: 即时处理请求数 1. **Http Request Total**: 请求总数。
2. **http_request_total**: 请求总数。 2. **Http Request Fail**: 请求总数。
3. **http_request_fail**: 请求总数。 3. **CPU Used**: taosAdapter CPU 使用情况。
4. **CPU Used**: taosAdapter CPU 使用情况。 4. **Memory Used**: taosAdapter 内存使用情况。
5. **Memory Used**: taosAdapter 内存使用情况。 5. **Http Request Inflight**: 即时处理请求数。
6. **Http Status Code**: taosAdapter http 状态码。
## 升级 ## 升级

View File

@ -77,7 +77,7 @@ sudo -u grafana grafana-cli plugins install tdengine-datasource
或者从 [GitHub](https://github.com/taosdata/grafanaplugin/releases/tag/latest) 或 [Grafana](https://grafana.com/grafana/plugins/tdengine-datasource/?tab=installation) 下载 .zip 文件到本地并解压到 Grafana 插件目录。命令行下载示例如下: 或者从 [GitHub](https://github.com/taosdata/grafanaplugin/releases/tag/latest) 或 [Grafana](https://grafana.com/grafana/plugins/tdengine-datasource/?tab=installation) 下载 .zip 文件到本地并解压到 Grafana 插件目录。命令行下载示例如下:
```bash ```bash
GF_VERSION=3.2.7 GF_VERSION=3.2.9
# from GitHub # from GitHub
wget https://github.com/taosdata/grafanaplugin/releases/download/v$GF_VERSION/tdengine-datasource-$GF_VERSION.zip wget https://github.com/taosdata/grafanaplugin/releases/download/v$GF_VERSION/tdengine-datasource-$GF_VERSION.zip
# from Grafana # from Grafana
@ -156,13 +156,13 @@ docker run -d \
services: services:
tdengine: tdengine:
image: tdengine/tdengine:2.6.0.2 image: tdengine/tdengine:3.0.2.4
environment: environment:
TAOS_FQDN: tdengine TAOS_FQDN: tdengine
volumes: volumes:
- tdengine-data:/var/lib/taos/ - tdengine-data:/var/lib/taos/
grafana: grafana:
image: grafana/grafana:8.5.6 image: grafana/grafana:9.3.6
volumes: volumes:
- ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml - ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
- grafana-data:/var/lib/grafana - grafana-data:/var/lib/grafana
@ -197,11 +197,17 @@ docker run -d \
- INPUT SQL输入要查询的语句该 SQL 语句的结果集应为两列多行),例如:`select _wstart, avg(mem_system) from log.dnodes_info where ts >= $from and ts < $to interval($interval)` 其中from、to 和 interval 为 TDengine 插件的内置变量,表示从 Grafana 插件面板获取的查询范围和时间间隔。除了内置变量外,`也支持可以使用自定义模板变量`。 - INPUT SQL输入要查询的语句该 SQL 语句的结果集应为两列多行),例如:`select _wstart, avg(mem_system) from log.dnodes_info where ts >= $from and ts < $to interval($interval)` 其中from、to 和 interval 为 TDengine 插件的内置变量,表示从 Grafana 插件面板获取的查询范围和时间间隔。除了内置变量外,`也支持可以使用自定义模板变量`。
- ALIAS BY可设置当前查询别名。 - ALIAS BY可设置当前查询别名。
- GENERATE SQL 点击该按钮会自动替换相应变量,并生成最终执行的语句。 - GENERATE SQL 点击该按钮会自动替换相应变量,并生成最终执行的语句。
- Group by column name(s) **半角**逗号分隔的 `group by` 或 `partition by` 列名。如果是 `group by` or `partition by` 查询语句,设置 `Group by` 列可以展示多维数据。例如INPUT SQL 为 `select _wstart as ts, avg(mem_system), dnode_ep from log.dnodes_info where ts>=$from and ts<=$to partition by dnode_ep interval($interval)`,设置 Group by 列名为 `dnode_ep`,可以按 `dnode_ep` 展示数据。
- Format to Group by 或 Partition by 场景下多维数据 legend 格式化格式。例如上述 INPUT SQL将 Format to 设置为 `mem_system_{{dnode_ep}}`,展示的 legend 名字为格式化的列名。
按照默认提示查询当前 TDengine 部署所在服务器指定间隔系统内存平均使用量如下: 按照默认提示查询当前 TDengine 部署所在服务器指定间隔系统内存平均使用量如下:
![TDengine Database Grafana plugin create dashboard](./create_dashboard2.webp) ![TDengine Database Grafana plugin create dashboard](./create_dashboard2.webp)
查询每台 TDengine 服务器指定间隔系统内存平均使用量如下:
![TDengine Database Grafana plugin create dashboard](./create_dashboard3.webp)
> 关于如何使用 Grafana 创建相应的监测界面以及更多有关使用 Grafana 的信息,请参考 Grafana 官方的[文档](https://grafana.com/docs/)。 > 关于如何使用 Grafana 创建相应的监测界面以及更多有关使用 Grafana 的信息,请参考 Grafana 官方的[文档](https://grafana.com/docs/)。
### 导入 Dashboard ### 导入 Dashboard

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB