未验证 提交 bd2e4720 编写于 作者: Y Yaqiang Li 提交者: GitHub

Merge pull request #20428 from taosdata/docs-cloud-ug

Docs cloud ug
...@@ -174,10 +174,16 @@ TDengine 系统建议给一个数据采集点建表,需要通过超级表建 ...@@ -174,10 +174,16 @@ TDengine 系统建议给一个数据采集点建表,需要通过超级表建
一个库里,可以有一到多个超级表,但一个超级表只属于一个库。一个超级表所拥有的子表全部存在一个库里。 一个库里,可以有一到多个超级表,但一个超级表只属于一个库。一个超级表所拥有的子表全部存在一个库里。
## FQDN & Endpoint ## 实例, URL和令牌
FQDN(Fully Qualified Domain Name,完全限定域名)是 Internet 上特定计算机或主机的完整域名。FQDN 由两部分组成:主机名和域名。例如,假设邮件服务器的 FQDN 可能是 mail.tdengine.com。主机名是 mail,主机位于域名 tdengine.com 中。DNS(Domain Name System),负责将 FQDN 翻译成 IP,是互联网应用的寻址方式。对于没有 DNS 的系统,可以通过配置 hosts 文件来解决。 An instance is a running cluster of nodes of TDengine with one or more databases. An instance cannot span across multiple regions or multiple clouds. TDengine cloud provides a unique URL for each instance and uses tokens to authenticate the access. The token is generated by TDengine cloud for each user and for each instance. The token has an expiration date and can be reset by the user for each instance at any time for security purpose.
TDengine 集群的每个节点是由 Endpoint 来唯一标识的,Endpoint 是由 FQDN 外加 Port 组成,比如 h1.tdengine.com:6030。这样当 IP 发生变化的时候,我们依然可以使用 FQDN 来动态找到节点,不需要更改集群的任何配置。而且采用 FQDN,便于内网和外网对同一个集群的统一访问 一个实例是一个运行的带有一个或多个数据库的 TDengine 节点集群。一个实例不能横跨多个地区或多个云。TDengine Cloud 为每个实例提供一个唯一的 URL,并使用令牌来验证访问。令牌是 TDengine Cloud 为每个用户和每个实例生成的,并且有一个到期日。为了安全起见,用户可以在任何时候为每个实例重置令牌
TDengine 不建议采用直接的 IP 地址访问集群,不利于管理。不了解 FQDN 概念,请看博文[《一篇文章说清楚 TDengine 的 FQDN》](https://www.taosdata.com/blog/2020/09/11/1824.html) ## 用户和用户组
当用户注册 TDengine Cloud 的时候,会自动创建一个拥有一个实例的组织,并且他或她会自动成为这个组织的系统管理员。系统管理员以后可以在一个组织中添加更多的实例。此外,系统管理员可以邀请其他人在他或她的组织内以指定的权限共享数据。他或她可以共享整个组织、实例、数据库或具有一定权限的主题,以确保数据被安全地共享。
一个用户的唯一标识是电子邮件地址,他或她可能属于多个组织。在不同的组织中,他或她可能有不同的角色和不同的访问权限。
计费是基于一个组织所拥有的所有实例的使用量来计费的。
...@@ -12,11 +12,11 @@ Prometheus 提供了 `remote_write` 和 `remote_read` 接口来利用其它数 ...@@ -12,11 +12,11 @@ Prometheus 提供了 `remote_write` 和 `remote_read` 接口来利用其它数
## 前置条件 ## 前置条件
登录到 TDengine Cloud ,在左边的菜单点击”数据浏览器“,然后再点击”数据库“标签旁边的”+“按钮添加一个名称是”prometheus_data“使用默认参数的数据库。然后执行 `show databases` SQL确认数据库确实被成功创建出来。 登录到 TDengine Cloud,在左边的菜单点击”数据浏览器“,然后再点击”数据库“标签旁边的”+“按钮添加一个名称是”prometheus_data“使用默认参数的数据库。然后执行 `show databases` SQL确认数据库确实被成功创建出来。
## 安装 Prometheus ## 安装 Prometheus
假设您使用的是 amd64 架构的 Linux 操作系统: 假设您使用的是 amd64 架构的 Linux 操作系统
1. 下载 1. 下载
``` ```
wget https://github.com/prometheus/prometheus/releases/download/v2.37.0/prometheus-2.37.0.linux-amd64.tar.gz wget https://github.com/prometheus/prometheus/releases/download/v2.37.0/prometheus-2.37.0.linux-amd64.tar.gz
...@@ -62,8 +62,7 @@ remote_read: ...@@ -62,8 +62,7 @@ remote_read:
## 验证远程写入 ## 验证远程写入
Log in TDengine Cloud, click "Explorer" on the left navigation bar. You will see metrics collected by prometheus. 登录 TDengine Cloud,然后点击左边导航栏的”数据浏览器“。您就会看见由 Prometheus 收集的指标数据。
登录 TDengine Cloud ,然后点击左边导航栏的”数据浏览器“。您就会看见由 Prometheus 收集的指标数据。
![TDengine prometheus remote_write result](prometheus_data.webp) ![TDengine prometheus remote_write result](prometheus_data.webp)
:::note :::note
......
...@@ -45,7 +45,7 @@ export TDENGINE_CLOUD_TOKEN="<token>" ...@@ -45,7 +45,7 @@ export TDENGINE_CLOUD_TOKEN="<token>"
{{#include docs/examples/thirdparty/gen-telegraf-conf.sh:null:nrc}} {{#include docs/examples/thirdparty/gen-telegraf-conf.sh:null:nrc}}
``` ```
编辑”outputs.http“部分 编辑”outputs.http“部分
```toml ```toml
{{#include docs/examples/thirdparty/telegraf-conf.toml:null:nrc}} {{#include docs/examples/thirdparty/telegraf-conf.toml:null:nrc}}
...@@ -63,14 +63,14 @@ telegraf --config telegraf.conf ...@@ -63,14 +63,14 @@ telegraf --config telegraf.conf
## 验证 ## 验证
- 通过下面命令检查天气数据库"telegraf"被创建出来: - 通过下面命令检查 `weather` 数据库 `telegraf` 被创建出来:
```sql ```sql
show databases; show databases;
``` ```
![TDengine show telegraf databases](./telegraf-show-databases.webp) ![TDengine show telegraf databases](./telegraf-show-databases.webp)
检查天气超级表 cpu 和 mem 被创建出来: 检查 `weather` 超级表 cpu 和 mem 被创建出来:
```sql ```sql
show telegraf.stables; show telegraf.stables;
......
...@@ -19,43 +19,43 @@ taosdump 是一个逻辑备份工具,它不应被用于备份任何原始数 ...@@ -19,43 +19,43 @@ taosdump 是一个逻辑备份工具,它不应被用于备份任何原始数
硬件信息、服务端配置或集群的拓扑结构。taosdump 使用 硬件信息、服务端配置或集群的拓扑结构。taosdump 使用
[Apache AVRO](https://avro.apache.org/)作为数据文件格式来存储备份数据。 [Apache AVRO](https://avro.apache.org/)作为数据文件格式来存储备份数据。
## Installation ## 安装
Please refer to [Install taosTools](https://docs.tdengine.com/cloud/tools/taosdump/#installation). 请参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。
## Common usage scenarios ## 常用使用场景
### taosdump backup data ### taosdump 备份数据
1. backing up all databases: specify `-A` or `-all-databases` parameter. 1. 备份所有数据库:指定 `-A``--all-databases` 参数;
2. backup multiple specified databases: use `-D db1,db2,...` parameters; 2. 备份多个指定数据库:使用 `-D db1,db2,...` 参数;
3. back up some super or normal tables in the specified database: use `-dbname stbname1 stbname2 tbname1 tbname2 ...` parameters. Note that the first parameter of this input sequence is the database name, and only one database is supported. The second and subsequent parameters are the names of super or normal tables in that database, separated by spaces. 3. 备份指定数据库中的某些超级表或普通表:使用 `dbname stbname1 stbname2 tbname1 tbname2 ...` 参数,注意这种输入序列第一个参数为数据库名称,且只支持一个数据库,第二个和之后的参数为该数据库中的超级表或普通表名称,中间以空格分隔;
4. back up the system log database: TDengine clusters usually contain a system database named `log`. The data in this database is the data that TDengine runs itself, and the taosdump will not back up the log database by default. If users need to back up the log database, users can use the `-a` or `-allow-sys` command-line parameter. 4. 备份系统 log 库:TDengine 集群通常会包含一个系统数据库,名为 `log`,这个数据库内的数据为 TDengine 自我运行的数据,taosdump 默认不会对 log 库进行备份。如果有特定需求对 log 库进行备份,可以使用 `-a``--allow-sys` 命令行参数。
5. Loose mode backup: taosdump version 1.4.1 onwards provides `-n` and `-L` parameters for backing up data without using escape characters and "loose" mode, which can reduce the number of backups if table names, column names, tag names do not use escape characters. This can also reduce the backup data time and backup data footprint. If you are unsure about using `-n` and `-L` conditions, please use the default parameters for "strict" mode backup. See the [official documentation](https://docs.tdengine.com/taos-sql/escape/) for a description of escaped characters. 5. “宽容”模式备份:taosdump 1.4.1 之后的版本提供 `-n` 参数和 `-L` 参数,用于备份数据时不使用转义字符和“宽容”模式,可以在表名、列名、标签名没使用转义字符的情况下减少备份数据时间和备份数据占用空间。如果不确定符合使用 `-n``-L` 条件时请使用默认参数进行“严格”模式进行备份。转义字符的说明请参考[官方文档](/taos-sql/escape)
<!-- exclude --> <!-- exclude -->
:::tip :::tip
- taosdump 1.4.1 之后的版本提供 `-I` 参数,用于解析 avro 文件 schema 和数据,如果指定 `-s` 参数将只解析 schema。
- taosdump versions after 1.4.1 provide the `-I` argument for parsing Avro file schema and data. If users specify `-s` then only taosdump will parse schema. - taosdump 1.4.2 之后的备份使用 `-B` 参数指定的批次数,默认值为 16384,如果在某些环境下由于网络速度或磁盘性能不足导致 "Error actual dump .. batch .." 可以通过 `-B` 参数调整为更小的值进行尝试。
- Backups after taosdump 1.4.2 use the batch count specified by the `-B` parameter. The default value is 16384. If, in some environments, low network speed or disk performance causes "Error actual dump ... batch ...", then try changing the `-B` parameter to a smaller value. - taosdump 的导出不支持中断恢复,所以当进程意外终止后,正确的处理方式是删除当前已导出或生成的所有相关文件。
- taosdump 的导入支持中断恢复,但是当进程重新启动时,会收到一些“表已经存在”的提示,可以忽视。
::: :::
<!-- exclude-end --> <!-- exclude-end -->
### taosdump recover data ### taosdump 恢复数据
Restore the data file in the specified path: use the `-i` parameter plus the path to the data file. You should not use the same directory to backup different data sets, and you should not backup the same data set multiple times in the same path. Otherwise, the backup data will cause overwriting or multiple backups. 恢复指定路径下的数据文件:使用 `-i` 参数加上数据文件所在路径。如前面提及,不应该使用同一个目录备份不同数据集合,也不应该在同一路径多次备份同一数据集,否则备份数据会造成覆盖或多次备份。
<!-- exclude --> <!-- exclude -->
:::tip :::tip
taosdump internally uses TDengine stmt binding API for writing recovery data with a default batch size of 16384 for better data recovery performance. If there are more columns in the backup data, it may cause a "WAL size exceeds limit" error. You can try to adjust the batch size to a smaller value by using the `-B` parameter. taosdump 内部使用 TDengine stmt binding API 进行恢复数据的写入,为提高数据恢复性能,目前使用 16384 为一次写入批次。如果备份数据中有比较多列数据,可能会导致产生 "WAL size exceeds limit" 错误,此时可以通过使用 `-B` 参数调整为一个更小的值进行尝试。
::: :::
<!-- exclude-end --> <!-- exclude-end -->
## Detailed command-line parameter list ## 详细命令行参数列表
The following is a detailed list of taosdump command-line arguments. 以下为 taosdump 详细命令行参数列表:
``` ```
Usage: taosdump [OPTION...] dbname [tbname ...] Usage: taosdump [OPTION...] dbname [tbname ...]
......
...@@ -10,15 +10,15 @@ Prometheus provides `remote_read` interface to leverage other database products ...@@ -10,15 +10,15 @@ Prometheus provides `remote_read` interface to leverage other database products
## Install Prometheus ## Install Prometheus
Please refer to [Install Prometheus](https://docs.tdengine.com/cloud/data-in/prometheus#install-prometheus). Please refer to [Install Prometheus](https://docs.taosdata.com/cloud/data-in/prometheus#install-prometheus).
## Configure Prometheus ## Configure Prometheus
Please refer to [Configure Prometheus](https://docs.tdengine.com/cloud/prometheus/#configure-prometheus). Please refer to [Configure Prometheus](https://docs.taosdata.com/cloud/prometheus/#configure-prometheus).
## Start Prometheus ## Start Prometheus
Please refer to [Start Prometheus](https://docs.tdengine.com/cloud/data-in/prometheus/#start-prometheus). Please refer to [Start Prometheus](https://docs.taosdata.com/cloud/data-in/prometheus/#start-prometheus).
## Verify Remote Read ## Verify Remote Read
......
...@@ -49,6 +49,6 @@ sudo systemctl restart grafana-server.service ...@@ -49,6 +49,6 @@ sudo systemctl restart grafana-server.service
![验证 TDengine 数据源](./grafana/verifying-tdengine-datasource.webp) ![验证 TDengine 数据源](./grafana/verifying-tdengine-datasource.webp)
## Use Grafana ## 使用 Grafana
请创建一个新的仪表盘,或者导入存在的仪表盘来展示 TDengine 里面的数据。同时更多细节请参考[文档](https://docs.tdengine.com/third-party/grafana#create-dashboard) 请创建一个新的仪表盘,或者导入存在的仪表盘来展示 TDengine 里面的数据。同时更多细节请参考[文档](https://docs.taosdata.com/third-party/grafana#create-dashboard)
...@@ -68,4 +68,4 @@ select * from test.demo where ts >= '2022-05-10 18:24:15' and ts<='2022-05-12 18 ...@@ -68,4 +68,4 @@ select * from test.demo where ts >= '2022-05-10 18:24:15' and ts<='2022-05-12 18
## 创建报表和仪表盘 ## 创建报表和仪表盘
使用交互式仪表盘和优美报表解锁您的 TDengine 数据能力,更多详情请参考[文档](https://docs.tdengine.com/third-party/google-data-studio/) 使用交互式仪表盘和优美报表解锁您的 TDengine 数据能力,更多详情请参考[文档](https://docs.taosdata.com/third-party/google-data-studio/)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册