未验证 提交 1d483fd5 编写于 作者: S sunpeng 提交者: GitHub

docs: update grafana and tdinsight docs (#19842)

* docs: update grafana and tdinsight docs

* fix: typo

---------
Co-authored-by: sangshuduo's avatarShuduo Sang <sangshuduo@gmail.com>
上级 8659c21b
......@@ -326,11 +326,12 @@ Currently, only the number of logins per minute is reported.
Support monitoring taosAdapter request statistics and status details. Includes.
1. **http_request_inflight**: number of real-time requests.
2. **http_request_total**: number of total requests.
3. **http_request_fail**: number of failed requets.
4. **CPU Used**: CPU usage of taosAdapter.
5. **Memory Used**: Memory usage of taosAdapter.
1. **Http Request Total**: number of total requests.
2. **Http Request Fail**: number of failed requests.
3. **CPU Used**: CPU usage of taosAdapter.
4. **Memory Used**: Memory usage of taosAdapter.
5. **Http Request Inflight**: number of real-time requests.
6. **Http Status Code**: taosAdapter http status code.
## Upgrade
......
......@@ -156,13 +156,13 @@ You can setup a zero-configuration stack for TDengine + Grafana by [docker-compo
services:
tdengine:
image: tdengine/tdengine:2.6.0.2
image: tdengine/tdengine:3.0.2.4
environment:
TAOS_FQDN: tdengine
volumes:
- tdengine-data:/var/lib/taos/
grafana:
image: grafana/grafana:8.5.6
image: grafana/grafana:9.3.6
volumes:
- ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
- 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.
- 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.
- 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.
![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/).
### Importing the Dashboard
......
......@@ -345,11 +345,12 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源的使用情况和状态,
支持监控 taosAdapter 请求统计和状态详情。包括:
1. **http_request_inflight**: 即时处理请求数
2. **http_request_total**: 请求总数。
3. **http_request_fail**: 请求总数。
4. **CPU Used**: taosAdapter CPU 使用情况。
5. **Memory Used**: taosAdapter 内存使用情况。
1. **Http Request Total**: 请求总数。
2. **Http Request Fail**: 请求总数。
3. **CPU Used**: taosAdapter CPU 使用情况。
4. **Memory Used**: taosAdapter 内存使用情况。
5. **Http Request Inflight**: 即时处理请求数。
6. **Http Status Code**: taosAdapter http 状态码。
## 升级
......
......@@ -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 插件目录。命令行下载示例如下:
```bash
GF_VERSION=3.2.7
GF_VERSION=3.2.9
# from GitHub
wget https://github.com/taosdata/grafanaplugin/releases/download/v$GF_VERSION/tdengine-datasource-$GF_VERSION.zip
# from Grafana
......@@ -156,13 +156,13 @@ docker run -d \
services:
tdengine:
image: tdengine/tdengine:2.6.0.2
image: tdengine/tdengine:3.0.2.4
environment:
TAOS_FQDN: tdengine
volumes:
- tdengine-data:/var/lib/taos/
grafana:
image: grafana/grafana:8.5.6
image: grafana/grafana:9.3.6
volumes:
- ./tdengine.yml/:/etc/grafana/provisioning/tdengine.yml
- 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 插件面板获取的查询范围和时间间隔。除了内置变量外,`也支持可以使用自定义模板变量`。
- ALIAS BY:可设置当前查询别名。
- 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 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/)。
### 导入 Dashboard
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册