mod monitor doc
This commit is contained in:
parent
5cc9652813
commit
be8e32c0d4
|
@ -52,247 +52,11 @@ TDengine 数据源插件已被提交至 Grafana 官网,完成插件的安装
|
|||
|
||||
**注意** 在 TDinsight 界面左上角的 Log from 下拉列表中可以选择 log 数据库。
|
||||
|
||||
### taosd 监控数据
|
||||
|
||||
TDinsight dashboard 数据来源于 `log` 库(存放监控数据的默认 db,可以在 taoskeeper 配置文件中修改)。以下是由 taosd 上报由 taosKeeper 存储在 log 库中的数据。
|
||||
|
||||
#### taosd\_cluster\_basic 表
|
||||
|
||||
`taosd_cluster_basic` 表记录集群基础信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------------- | :-------- | :------ | :------------------------------ |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| first\_ep | VARCHAR | | 集群 first ep |
|
||||
| first\_ep\_dnode\_id | INT | | 集群 first ep 的 dnode id |
|
||||
| cluster_version | VARCHAR | | tdengine version。例如:3.0.4.0 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_cluster\_info 表
|
||||
|
||||
`taosd_cluster_info` 表记录集群信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :----------------------- | :-------- | :------ | :----------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| cluster_uptime | DOUBLE | | 当前 master 节点的uptime。单位:秒 |
|
||||
| dbs\_total | DOUBLE | | database 总数 |
|
||||
| tbs\_total | DOUBLE | | 当前集群 table 总数 |
|
||||
| stbs\_total | DOUBLE | | 当前集群 stable 总数 |
|
||||
| dnodes\_total | DOUBLE | | 当前集群 dnode 总数 |
|
||||
| dnodes\_alive | DOUBLE | | 当前集群 dnode 存活总数 |
|
||||
| mnodes\_total | DOUBLE | | 当前集群 mnode 总数 |
|
||||
| mnodes\_alive | DOUBLE | | 当前集群 mnode 存活总数 |
|
||||
| vgroups\_total | DOUBLE | | 当前集群 vgroup 总数 |
|
||||
| vgroups\_alive | DOUBLE | | 当前集群 vgroup 存活总数 |
|
||||
| vnodes\_total | DOUBLE | | 当前集群 vnode 总数 |
|
||||
| vnodes\_alive | DOUBLE | | 当前集群 vnode 存活总数 |
|
||||
| connections\_total | DOUBLE | | 当前集群连接总数 |
|
||||
| topics\_total | DOUBLE | | 当前集群 topic 总数 |
|
||||
| streams\_total | DOUBLE | | 当前集群 stream 总数 |
|
||||
| grants_expire\_time | DOUBLE | | 认证过期时间,企业版有效,社区版为 DOUBLE 最大值 |
|
||||
| grants_timeseries\_used | DOUBLE | | 已用测点数 |
|
||||
| grants_timeseries\_total | DOUBLE | | 总测点数,开源版本为 DOUBLE 最大值 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_vgroups\_info 表
|
||||
|
||||
`taosd_vgroups_info` 表记录虚拟节点组信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------- | :-------- | :------ | :--------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| tables\_num | DOUBLE | | vgroup 中 table 数量 |
|
||||
| status | DOUBLE | | vgroup 状态, 取值范围:unsynced = 0, ready = 1 |
|
||||
| vgroup\_id | VARCHAR | TAG | vgroup id |
|
||||
| database\_name | VARCHAR | TAG | vgroup 所属的 database 名字 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_dnodes\_info 表
|
||||
|
||||
`taosd_dnodes_info` 记录 dnode 信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------------- | :-------- | :------ | :------------------------------------------------------------------------------------------------ |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| uptime | DOUBLE | | dnode uptime,单位:秒 |
|
||||
| cpu\_engine | DOUBLE | | taosd cpu 使用率,从 `/proc/<taosd_pid>/stat` 读取 |
|
||||
| cpu\_system | DOUBLE | | 服务器 cpu 使用率,从 `/proc/stat` 读取 |
|
||||
| cpu\_cores | DOUBLE | | 服务器 cpu 核数 |
|
||||
| mem\_engine | DOUBLE | | taosd 内存使用率,从 `/proc/<taosd_pid>/status` 读取 |
|
||||
| mem\_free | DOUBLE | | 服务器可用内存,单位 KB |
|
||||
| mem\_total | DOUBLE | | 服务器内存总量,单位 KB |
|
||||
| disk\_used | DOUBLE | | data dir 挂载的磁盘使用量,单位 bytes |
|
||||
| disk\_total | DOUBLE | | data dir 挂载的磁盘总容量,单位 bytes |
|
||||
| system\_net\_in | DOUBLE | | 网络吞吐率,从 `/proc/net/dev` 中读取的 received bytes。单位 byte/s |
|
||||
| system\_net\_out | DOUBLE | | 网络吞吐率,从 `/proc/net/dev` 中读取的 transmit bytes。单位 byte/s |
|
||||
| io\_read | DOUBLE | | io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 rchar 与上次数值计算之后,计算得到速度。单位 byte/s |
|
||||
| io\_write | DOUBLE | | io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 wchar 与上次数值计算之后,计算得到速度。单位 byte/s |
|
||||
| io\_read\_disk | DOUBLE | | 磁盘 io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 read_bytes。单位 byte/s |
|
||||
| io\_write\_disk | DOUBLE | | 磁盘 io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 write_bytes。单位 byte/s |
|
||||
| vnodes\_num | DOUBLE | | dnode 上 vnodes 数量 |
|
||||
| masters | DOUBLE | | dnode 上 master node 数量 |
|
||||
| has\_mnode | DOUBLE | | dnode 是否包含 mnode,取值范围:包含=1,不包含=0 |
|
||||
| has\_qnode | DOUBLE | | dnode 是否包含 qnode,取值范围:包含=1,不包含=0 |
|
||||
| has\_snode | DOUBLE | | dnode 是否包含 snode,取值范围:包含=1,不包含=0 |
|
||||
| has\_bnode | DOUBLE | | dnode 是否包含 bnode,取值范围:包含=1,不包含=0 |
|
||||
| error\_log\_count | DOUBLE | | error 总数 |
|
||||
| info\_log\_count | DOUBLE | | info 总数 |
|
||||
| debug\_log\_count | DOUBLE | | debug 总数 |
|
||||
| trace\_log\_count | DOUBLE | | trace 总数 |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_dnodes\_status 表
|
||||
|
||||
`taosd_dnodes_status` 表记录 dnode 状态信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :--------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| status | DOUBLE | | dnode 状态,取值范围:ready=1,offline =0 |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_dnodes\_log\_dir 表
|
||||
|
||||
`taosd_dnodes_log_dir` 表记录 log 目录信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| avail | DOUBLE | | log 目录可用空间。单位 byte |
|
||||
| used | DOUBLE | | log 目录已使用空间。单位 byte |
|
||||
| total | DOUBLE | | log 目录空间。单位 byte |
|
||||
| name | VARCHAR | TAG | log 目录名,一般为 `/var/log/taos/` |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_dnodes\_data\_dir 表
|
||||
|
||||
`taosd_dnodes_data_dir` 表记录 data 目录信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :-------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| avail | DOUBLE | | data 目录可用空间。单位 byte |
|
||||
| used | DOUBLE | | data 目录已使用空间。单位 byte |
|
||||
| total | DOUBLE | | data 目录空间。单位 byte |
|
||||
| level | VARCHAR | TAG | 0、1、2 多级存储级别 |
|
||||
| name | VARCHAR | TAG | data 目录,一般为 `/var/lib/taos` |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_mnodes\_info 表
|
||||
|
||||
`taosd_mnodes_info` 表记录 mnode 角色信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :------------------------------------------------------------------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| role | DOUBLE | | mnode 角色, 取值范围:offline = 0,follower = 100,candidate = 101,leader = 102,error = 103,learner = 104 |
|
||||
| mnode\_id | VARCHAR | TAG | master node id |
|
||||
| mnode\_ep | VARCHAR | TAG | master node endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_vnodes\_role 表
|
||||
|
||||
`taosd_vnodes_role` 表记录虚拟节点角色信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------- | :-------- | :------ | :------------------------------------------------------------------------------------------------------ |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| vnode\_role | DOUBLE | | vnode 角色,取值范围:offline = 0,follower = 100,candidate = 101,leader = 102,error = 103,learner = 104 |
|
||||
| vgroup\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| database\_name | VARCHAR | TAG | vgroup 所属的 database 名字 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taosd\_sql\_req 表
|
||||
|
||||
`taosd_sql_req` 记录授权信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :--------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| sql\_type | VARCHAR | TAG | sql类型,取值范围:inserted_rows |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| vgroup\_id | VARCHAR | TAG | dnode id |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taos\_sql\_req 表
|
||||
|
||||
`taos_sql_req` 记录授权信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| sql\_type | VARCHAR | TAG | sql类型,取值范围:select, insert,delete |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
#### taos\_slow\_sql 表
|
||||
|
||||
`taos_slow_sql` 记录授权信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| duration | VARCHAR | TAG | sql执行耗时,取值范围:3-10s,10-100s,100-1000s,1000s- |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
|
||||
|
||||
#### adapter\_requests 表
|
||||
|
||||
`adapter_requests` 记录 taosadapter 监控数据。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :----------------- | :----------- | :------ | :---------------------------------- |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| total | INT UNSIGNED | | 总请求数 |
|
||||
| query | INT UNSIGNED | | 查询请求数 |
|
||||
| write | INT UNSIGNED | | 写入请求数 |
|
||||
| other | INT UNSIGNED | | 其他请求数 |
|
||||
| in\_process | INT UNSIGNED | | 正在处理请求数 |
|
||||
| success | INT UNSIGNED | | 成功请求数 |
|
||||
| fail | INT UNSIGNED | | 失败请求数 |
|
||||
| query\_success | INT UNSIGNED | | 查询成功请求数 |
|
||||
| query\_fail | INT UNSIGNED | | 查询失败请求数 |
|
||||
| write\_success | INT UNSIGNED | | 写入成功请求数 |
|
||||
| write\_fail | INT UNSIGNED | | 写入失败请求数 |
|
||||
| other\_success | INT UNSIGNED | | 其他成功请求数 |
|
||||
| other\_fail | INT UNSIGNED | | 其他失败请求数 |
|
||||
| query\_in\_process | INT UNSIGNED | | 正在处理查询请求数 |
|
||||
| write\_in\_process | INT UNSIGNED | | 正在处理写入请求数 |
|
||||
| endpoint | VARCHAR | | 请求端点 |
|
||||
| req\_type | NCHAR | TAG | 请求类型:0 为 REST,1 为 Websocket |
|
||||
|
||||
|
||||
#### keeper\_monitor 表
|
||||
|
||||
`keeper_monitor` 记录 taoskeeper 监控数据。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------- | :-------- | :------ | :----------- |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| cpu | DOUBLE | | cpu 使用率 |
|
||||
| mem | DOUBLE | | 内存使用率 |
|
||||
| identify | NCHAR | TAG | 身份标识信息 |
|
||||
### TDengine V3 监控数据
|
||||
|
||||
TDinsight dashboard 数据来源于 `log` 库(存放监控数据的默认 db,可以在 taoskeeper 配置文件中修改)。”TDinsight for 3.x“ 仪表盘查询了 taosd 和 TaosAdapter 的监控指标。
|
||||
- taosd 的监控指标请参考 [taosd 监控指标](../../reference/components/taosd/#taosd-监控指标)
|
||||
- taosAdapter 的监控指标请参考 [taosAdapter 监控指标](../../reference/components/taosadapter/#taosadapter-监控指标)
|
||||
|
||||
## 监控 taosX
|
||||
|
||||
|
|
|
@ -27,42 +27,42 @@ taosd 命令行参数如下
|
|||
|
||||
### 连接相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|firstEp | taosd 启动时,主动连接的集群中首个 dnode 的 end point,缺省值:localhost:6030 |
|
||||
|secondEp | taosd 启动时,如果 firstEp 连接不上,尝试连接集群中第二个 dnode 的 endpoint,缺省值:无|
|
||||
|fqdn | 启动 taosd 后所监听的服务地址,缺省值:所在服务器上配置的第一个 hostname |
|
||||
|serverPort | 启动 taosd 后所监听的端口,缺省值:6030 |
|
||||
|maxShellConns | 一个 dnode 容许的连接数,取值范围为 10-5000000,缺省值:5000 |
|
||||
|numOfRpcSessions | 允许一个客户端能创建的最大连接数,取值范围 100-100000,缺省值:30000 |
|
||||
|timeToGetAvailableConn | 获得可用连接的最长等待时间,取值范围 10-50000000,单位为毫秒,缺省值:500000 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :--------------------: | :-------------------------------------------------------------------------------------: |
|
||||
| firstEp | taosd 启动时,主动连接的集群中首个 dnode 的 end point,缺省值:localhost:6030 |
|
||||
| secondEp | taosd 启动时,如果 firstEp 连接不上,尝试连接集群中第二个 dnode 的 endpoint,缺省值:无 |
|
||||
| fqdn | 启动 taosd 后所监听的服务地址,缺省值:所在服务器上配置的第一个 hostname |
|
||||
| serverPort | 启动 taosd 后所监听的端口,缺省值:6030 |
|
||||
| maxShellConns | 一个 dnode 容许的连接数,取值范围为 10-5000000,缺省值:5000 |
|
||||
| numOfRpcSessions | 允许一个客户端能创建的最大连接数,取值范围 100-100000,缺省值:30000 |
|
||||
| timeToGetAvailableConn | 获得可用连接的最长等待时间,取值范围 10-50000000,单位为毫秒,缺省值:500000 |
|
||||
|
||||
### 监控相关
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|monitor | 是否收集监控数据并上报,0: 关闭;1:打开;缺省值:0 |
|
||||
|monitorFqdn | taosKeeper 服务所在服务器的 FQDN,缺省值:无 |
|
||||
|monitorPort | taosKeeper 服务所监听的端口号,缺省值:6043 |
|
||||
|monitorInternal | 监控数据库记录系统参数(CPU/内存)的时间间隔,单位是秒,取值范围 1-200000 ,缺省值:30|
|
||||
|telemetryReporting | 是否上传 telemetry,0: 不上传,1:上传,缺省值:1 |
|
||||
|crashReporting | 是否上传 crash 信息;0: 不上传,1: 上传;缺省值: 1|
|
||||
| 参数名称 | 参数说明 |
|
||||
| :----------------: | :------------------------------------------------------------------------------------: |
|
||||
| monitor | 是否收集监控数据并上报,0: 关闭;1:打开;缺省值:0 |
|
||||
| monitorFqdn | taosKeeper 服务所在服务器的 FQDN,缺省值:无 |
|
||||
| monitorPort | taosKeeper 服务所监听的端口号,缺省值:6043 |
|
||||
| monitorInternal | 监控数据库记录系统参数(CPU/内存)的时间间隔,单位是秒,取值范围 1-200000 ,缺省值:30 |
|
||||
| telemetryReporting | 是否上传 telemetry,0: 不上传,1:上传,缺省值:1 |
|
||||
| crashReporting | 是否上传 crash 信息;0: 不上传,1: 上传;缺省值: 1 |
|
||||
|
||||
### 查询相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|queryPolicy | 查询策略,1: 只使用 vnode,不使用 qnode; 2: 没有扫描算子的子任务在 qnode 执行,带扫描算子的子任务在 vnode 执行; 3: vnode 只运行扫描算子,其余算子均在 qnode 执行 ;缺省值:1 |
|
||||
|maxNumOfDistinctRes | 允许返回的 distinct 结果最大行数,默认值 10 万,最大允许值 1 亿 |
|
||||
|countAlwaysReturnValue | ount/hyperloglog函数在输入数据为空或者NULL的情况下是否返回值,0: 返回空行,1: 返回;该参数设置为 1 时,如果查询中含有 INTERVAL 子句或者该查询使用了TSMA时, 且相应的组或窗口内数据为空或者NULL, 对应的组或窗口将不返回查询结果. 注意此参数客户端和服务端值应保持一致.|
|
||||
| 参数名称 | 参数说明 |
|
||||
| :--------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| queryPolicy | 查询策略,1: 只使用 vnode,不使用 qnode; 2: 没有扫描算子的子任务在 qnode 执行,带扫描算子的子任务在 vnode 执行; 3: vnode 只运行扫描算子,其余算子均在 qnode 执行 ;缺省值:1 |
|
||||
| maxNumOfDistinctRes | 允许返回的 distinct 结果最大行数,默认值 10 万,最大允许值 1 亿 |
|
||||
| countAlwaysReturnValue | ount/hyperloglog函数在输入数据为空或者NULL的情况下是否返回值,0: 返回空行,1: 返回;该参数设置为 1 时,如果查询中含有 INTERVAL 子句或者该查询使用了TSMA时, 且相应的组或窗口内数据为空或者NULL, 对应的组或窗口将不返回查询结果. 注意此参数客户端和服务端值应保持一致. |
|
||||
|
||||
|
||||
### 区域相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|timezone | 时区,缺省值:当前服务器所配置的时区 |
|
||||
|locale | 系统区位信息及编码格式 ,缺省值:系统中动态获取,如果自动获取失败,需要用户在配置文件设置或通过 API 设置 |
|
||||
|charset | 字符集编码,缺省值:系统自动获取 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :------: | :------------------------------------------------------------------------------------------------------: |
|
||||
| timezone | 时区,缺省值:当前服务器所配置的时区 |
|
||||
| locale | 系统区位信息及编码格式 ,缺省值:系统中动态获取,如果自动获取失败,需要用户在配置文件设置或通过 API 设置 |
|
||||
| charset | 字符集编码,缺省值:系统自动获取 |
|
||||
|
||||
:::info
|
||||
1. 为应对多时区的数据写入和查询问题,TDengine 采用 Unix 时间戳(Unix Timestamp)来记录和存储时间戳。Unix 时间戳的特点决定了任一时刻不论在任何时区,产生的时间戳均一致。需要注意的是,Unix 时间戳是在客户端完成转换和记录。为了确保客户端其他形式的时间转换为正确的 Unix 时间戳,需要设置正确的时区。
|
||||
|
@ -141,64 +141,64 @@ charset 的有效值是 UTF-8。
|
|||
|
||||
### 存储相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|dataDir | 数据文件目录,所有的数据文件都将写入该目录,缺省值:/var/lib |
|
||||
|tempDir | 指定所有系统运行过程中的临时文件生成的目录,缺省值:/tmp |
|
||||
|minimalTmpDirGB | tempDir 所指定的临时文件目录所需要保留的最小空间,单位 GB,缺省值: 1|
|
||||
|minimalDataDirGB | dataDir 指定的时序数据存储目录所需要保留的最小空间,单位 GB,缺省值: 2 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :--------------: | :--------------------------------------------------------------------: |
|
||||
| dataDir | 数据文件目录,所有的数据文件都将写入该目录,缺省值:/var/lib |
|
||||
| tempDir | 指定所有系统运行过程中的临时文件生成的目录,缺省值:/tmp |
|
||||
| minimalTmpDirGB | tempDir 所指定的临时文件目录所需要保留的最小空间,单位 GB,缺省值: 1 |
|
||||
| minimalDataDirGB | dataDir 指定的时序数据存储目录所需要保留的最小空间,单位 GB,缺省值: 2 |
|
||||
|
||||
### 集群相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|supportVnodes | dnode 支持的最大 vnode 数目,取值范围:0-4096,缺省值: CPU 核数的 2 倍 + 5 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :-----------: | :-------------------------------------------------------------------------: |
|
||||
| supportVnodes | dnode 支持的最大 vnode 数目,取值范围:0-4096,缺省值: CPU 核数的 2 倍 + 5 |
|
||||
|
||||
### 性能调优
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|numOfCommitThreads | 写入线程的最大数量,取值范围 0-1024,缺省值为 4 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :----------------: | :---------------------------------------------: |
|
||||
| numOfCommitThreads | 写入线程的最大数量,取值范围 0-1024,缺省值为 4 |
|
||||
|
||||
### 日志相关
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|logDir | 日志文件目录,运行日志将写入该目录,缺省值:/var/log/taos |
|
||||
|minimalLogDirGB | 当日志文件夹所在磁盘可用空间大小小于该值时,停止写日志,单位GB,缺省值:1|
|
||||
|numOfLogLines | 单个日志文件允许的最大行数,缺省值:10,000,000 |
|
||||
|asyncLog | 日志写入模式,0: 同步,1: 异步,缺省值: 1 |
|
||||
|logKeepDays | 日志文件的最长保存时间 ,单位:天,缺省值:0,意味着无限保存;当设置为大于0 的值时,日志文件会被重命名为 taosdlog.xxx,其中 xxx 为日志文件最后修改的时间戳。 |
|
||||
|slowLogThreshold | 慢查询门限值,大于等于门限值认为是慢查询,单位秒,默认值: 3 |
|
||||
|slowLogScope | 定启动记录哪些类型的慢查询,可选值:ALL, QUERY, INSERT, OHTERS, NONE; 默认值:ALL |
|
||||
|debugFlag | 运行日志开关,131(输出错误和警告日志),135(输出错误、警告和调试日志),143(输出错误、警告、调试和跟踪日志); 默认值:131 或 135 (取决于不同模块)|
|
||||
|tmrDebugFlag | 定时器模块的日志开关,取值范围同上 |
|
||||
|uDebugFlag | 共用功能模块的日志开关,取值范围同上 |
|
||||
|rpcDebugFlag | rpc 模块的日志开关,取值范围同上 |
|
||||
|jniDebugFlag | jni 模块的日志开关,取值范围同上 |
|
||||
|qDebugFlag | query 模块的日志开关,取值范围同上 |
|
||||
|dDebugFlag | dnode 模块的日志开关,取值范围同上,缺省值 135 |
|
||||
|vDebugFlag | vnode 模块的日志开关,取值范围同上 |
|
||||
|mDebugFlag | mnode 模块的日志开关,取值范围同上 |
|
||||
|wDebugFlag | wal 模块的日志开关,取值范围同上 |
|
||||
|sDebugFlag | sync 模块的日志开关,取值范围同上 |
|
||||
|tsdbDebugFlag | tsdb 模块的日志开关,取值范围同上 |
|
||||
|tqDebugFlag | tq 模块的日志开关,取值范围同上 |
|
||||
|fsDebugFlag | fs 模块的日志开关,取值范围同上 |
|
||||
|udfDebugFlag | udf 模块的日志开关,取值范围同上 |
|
||||
|smaDebugFlag | sma 模块的日志开关,取值范围同上 |
|
||||
|idxDebugFlag | index 模块的日志开关,取值范围同上 |
|
||||
|tdbDebugFlag | tdb 模块的日志开关,取值范围同上 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :--------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| logDir | 日志文件目录,运行日志将写入该目录,缺省值:/var/log/taos |
|
||||
| minimalLogDirGB | 当日志文件夹所在磁盘可用空间大小小于该值时,停止写日志,单位GB,缺省值:1 |
|
||||
| numOfLogLines | 单个日志文件允许的最大行数,缺省值:10,000,000 |
|
||||
| asyncLog | 日志写入模式,0: 同步,1: 异步,缺省值: 1 |
|
||||
| logKeepDays | 日志文件的最长保存时间 ,单位:天,缺省值:0,意味着无限保存;当设置为大于0 的值时,日志文件会被重命名为 taosdlog.xxx,其中 xxx 为日志文件最后修改的时间戳。 |
|
||||
| slowLogThreshold | 慢查询门限值,大于等于门限值认为是慢查询,单位秒,默认值: 3 |
|
||||
| slowLogScope | 定启动记录哪些类型的慢查询,可选值:ALL, QUERY, INSERT, OHTERS, NONE; 默认值:ALL |
|
||||
| debugFlag | 运行日志开关,131(输出错误和警告日志),135(输出错误、警告和调试日志),143(输出错误、警告、调试和跟踪日志); 默认值:131 或 135 (取决于不同模块) |
|
||||
| tmrDebugFlag | 定时器模块的日志开关,取值范围同上 |
|
||||
| uDebugFlag | 共用功能模块的日志开关,取值范围同上 |
|
||||
| rpcDebugFlag | rpc 模块的日志开关,取值范围同上 |
|
||||
| jniDebugFlag | jni 模块的日志开关,取值范围同上 |
|
||||
| qDebugFlag | query 模块的日志开关,取值范围同上 |
|
||||
| dDebugFlag | dnode 模块的日志开关,取值范围同上,缺省值 135 |
|
||||
| vDebugFlag | vnode 模块的日志开关,取值范围同上 |
|
||||
| mDebugFlag | mnode 模块的日志开关,取值范围同上 |
|
||||
| wDebugFlag | wal 模块的日志开关,取值范围同上 |
|
||||
| sDebugFlag | sync 模块的日志开关,取值范围同上 |
|
||||
| tsdbDebugFlag | tsdb 模块的日志开关,取值范围同上 |
|
||||
| tqDebugFlag | tq 模块的日志开关,取值范围同上 |
|
||||
| fsDebugFlag | fs 模块的日志开关,取值范围同上 |
|
||||
| udfDebugFlag | udf 模块的日志开关,取值范围同上 |
|
||||
| smaDebugFlag | sma 模块的日志开关,取值范围同上 |
|
||||
| idxDebugFlag | index 模块的日志开关,取值范围同上 |
|
||||
| tdbDebugFlag | tdb 模块的日志开关,取值范围同上 |
|
||||
|
||||
### 压缩参数
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
| compressMsgSize | 是否对 RPC 消息进行压缩;-1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩;缺省值 -1 |
|
||||
| fPrecision | 设置 float 类型浮点数压缩精度 ,取值范围:0.1 ~ 0.00000001 ,默认值 0.00000001 , 小于此值的浮点数尾数部分将被截断 |
|
||||
|dPrecision | 设置 double 类型浮点数压缩精度 , 取值范围:0.1 ~ 0.0000000000000001 , 缺省值 0.0000000000000001 , 小于此值的浮点数尾数部分将被截取 |
|
||||
|lossyColumn | 对 float 和/或 double 类型启用 TSZ 有损压缩;取值范围: float, double, none;缺省值: none,表示关闭无损压缩 |
|
||||
|ifAdtFse | 在启用 TSZ 有损压缩时,使用 FSE 算法替换 HUFFMAN 算法, FSE 算法压缩速度更快,但解压稍慢,追求压缩速度可选用此算法; 0: 关闭,1:打开;默认值为 0 |
|
||||
| 参数名称 | 参数说明 |
|
||||
| :-------------: | :----------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| compressMsgSize | 是否对 RPC 消息进行压缩;-1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩;缺省值 -1 |
|
||||
| fPrecision | 设置 float 类型浮点数压缩精度 ,取值范围:0.1 ~ 0.00000001 ,默认值 0.00000001 , 小于此值的浮点数尾数部分将被截断 |
|
||||
| dPrecision | 设置 double 类型浮点数压缩精度 , 取值范围:0.1 ~ 0.0000000000000001 , 缺省值 0.0000000000000001 , 小于此值的浮点数尾数部分将被截取 |
|
||||
| lossyColumn | 对 float 和/或 double 类型启用 TSZ 有损压缩;取值范围: float, double, none;缺省值: none,表示关闭无损压缩 |
|
||||
| ifAdtFse | 在启用 TSZ 有损压缩时,使用 FSE 算法替换 HUFFMAN 算法, FSE 算法压缩速度更快,但解压稍慢,追求压缩速度可选用此算法; 0: 关闭,1:打开;默认值为 0 |
|
||||
|
||||
|
||||
**补充说明**
|
||||
|
@ -216,10 +216,214 @@ lossyColumns float|double
|
|||
|
||||
### 其他参数
|
||||
|
||||
| 参数名称 | 参数说明 |
|
||||
|:-------------:|:----------------------------------------------------------------:|
|
||||
|enableCoreFile | crash 时是否生成 core 文件;0: 不生成,1:生成;默认值 为 1; 不同的启动方式,生成 core 文件的目录如下:1、systemctl start taosd 启动:生成的 core 在根目录下 <br/> 2、手动启动,就在 taosd 执行目录下。|
|
||||
|udf | 是否启动 UDF 服务;0: 不启动,1:启动;默认值 为 0 |
|
||||
|ttlChangeOnWrite | ttl 到期时间是否伴随表的修改操作改变; 0: 不改变,1:改变 ;默认值 为 |
|
||||
| tmqMaxTopicNum| 订阅最多可建立的 topic 数量; 取值范围 1-10000;缺省值 为20 |
|
||||
|maxTsmaNum | 集群内可创建的TSMA个数;取值范围:0-3;缺省值: 3|
|
||||
| 参数名称 | 参数说明 |
|
||||
| :--------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| enableCoreFile | crash 时是否生成 core 文件;0: 不生成,1:生成;默认值 为 1; 不同的启动方式,生成 core 文件的目录如下:1、systemctl start taosd 启动:生成的 core 在根目录下 <br/> 2、手动启动,就在 taosd 执行目录下。 |
|
||||
| udf | 是否启动 UDF 服务;0: 不启动,1:启动;默认值 为 0 |
|
||||
| ttlChangeOnWrite | ttl 到期时间是否伴随表的修改操作改变; 0: 不改变,1:改变 ;默认值 为 |
|
||||
| tmqMaxTopicNum | 订阅最多可建立的 topic 数量; 取值范围 1-10000;缺省值 为20 |
|
||||
| maxTsmaNum | 集群内可创建的TSMA个数;取值范围:0-3;缺省值: 3 |
|
||||
|
||||
|
||||
## taosd 监控指标
|
||||
|
||||
taosd 会将监控指标上报给 taosKeeper,这些监控指标会被 taosKeeper 写入监控数据库,默认是 `log` 库,可以在 taoskeeper 配置文件中修改。以下是这些监控指标的详细介绍。
|
||||
|
||||
### taosd\_cluster\_basic 表
|
||||
|
||||
`taosd_cluster_basic` 表记录集群基础信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------------- | :-------- | :------ | :------------------------------ |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| first\_ep | VARCHAR | | 集群 first ep |
|
||||
| first\_ep\_dnode\_id | INT | | 集群 first ep 的 dnode id |
|
||||
| cluster_version | VARCHAR | | tdengine version。例如:3.0.4.0 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_cluster\_info 表
|
||||
|
||||
`taosd_cluster_info` 表记录集群信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :----------------------- | :-------- | :------ | :----------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| cluster_uptime | DOUBLE | | 当前 master 节点的uptime。单位:秒 |
|
||||
| dbs\_total | DOUBLE | | database 总数 |
|
||||
| tbs\_total | DOUBLE | | 当前集群 table 总数 |
|
||||
| stbs\_total | DOUBLE | | 当前集群 stable 总数 |
|
||||
| dnodes\_total | DOUBLE | | 当前集群 dnode 总数 |
|
||||
| dnodes\_alive | DOUBLE | | 当前集群 dnode 存活总数 |
|
||||
| mnodes\_total | DOUBLE | | 当前集群 mnode 总数 |
|
||||
| mnodes\_alive | DOUBLE | | 当前集群 mnode 存活总数 |
|
||||
| vgroups\_total | DOUBLE | | 当前集群 vgroup 总数 |
|
||||
| vgroups\_alive | DOUBLE | | 当前集群 vgroup 存活总数 |
|
||||
| vnodes\_total | DOUBLE | | 当前集群 vnode 总数 |
|
||||
| vnodes\_alive | DOUBLE | | 当前集群 vnode 存活总数 |
|
||||
| connections\_total | DOUBLE | | 当前集群连接总数 |
|
||||
| topics\_total | DOUBLE | | 当前集群 topic 总数 |
|
||||
| streams\_total | DOUBLE | | 当前集群 stream 总数 |
|
||||
| grants_expire\_time | DOUBLE | | 认证过期时间,企业版有效,社区版为 DOUBLE 最大值 |
|
||||
| grants_timeseries\_used | DOUBLE | | 已用测点数 |
|
||||
| grants_timeseries\_total | DOUBLE | | 总测点数,开源版本为 DOUBLE 最大值 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_vgroups\_info 表
|
||||
|
||||
`taosd_vgroups_info` 表记录虚拟节点组信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------- | :-------- | :------ | :--------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| tables\_num | DOUBLE | | vgroup 中 table 数量 |
|
||||
| status | DOUBLE | | vgroup 状态, 取值范围:unsynced = 0, ready = 1 |
|
||||
| vgroup\_id | VARCHAR | TAG | vgroup id |
|
||||
| database\_name | VARCHAR | TAG | vgroup 所属的 database 名字 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_dnodes\_info 表
|
||||
|
||||
`taosd_dnodes_info` 记录 dnode 信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------------- | :-------- | :------ | :------------------------------------------------------------------------------------------------ |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| uptime | DOUBLE | | dnode uptime,单位:秒 |
|
||||
| cpu\_engine | DOUBLE | | taosd cpu 使用率,从 `/proc/<taosd_pid>/stat` 读取 |
|
||||
| cpu\_system | DOUBLE | | 服务器 cpu 使用率,从 `/proc/stat` 读取 |
|
||||
| cpu\_cores | DOUBLE | | 服务器 cpu 核数 |
|
||||
| mem\_engine | DOUBLE | | taosd 内存使用率,从 `/proc/<taosd_pid>/status` 读取 |
|
||||
| mem\_free | DOUBLE | | 服务器可用内存,单位 KB |
|
||||
| mem\_total | DOUBLE | | 服务器内存总量,单位 KB |
|
||||
| disk\_used | DOUBLE | | data dir 挂载的磁盘使用量,单位 bytes |
|
||||
| disk\_total | DOUBLE | | data dir 挂载的磁盘总容量,单位 bytes |
|
||||
| system\_net\_in | DOUBLE | | 网络吞吐率,从 `/proc/net/dev` 中读取的 received bytes。单位 byte/s |
|
||||
| system\_net\_out | DOUBLE | | 网络吞吐率,从 `/proc/net/dev` 中读取的 transmit bytes。单位 byte/s |
|
||||
| io\_read | DOUBLE | | io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 rchar 与上次数值计算之后,计算得到速度。单位 byte/s |
|
||||
| io\_write | DOUBLE | | io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 wchar 与上次数值计算之后,计算得到速度。单位 byte/s |
|
||||
| io\_read\_disk | DOUBLE | | 磁盘 io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 read_bytes。单位 byte/s |
|
||||
| io\_write\_disk | DOUBLE | | 磁盘 io 吞吐率,从 `/proc/<taosd_pid>/io` 中读取的 write_bytes。单位 byte/s |
|
||||
| vnodes\_num | DOUBLE | | dnode 上 vnodes 数量 |
|
||||
| masters | DOUBLE | | dnode 上 master node 数量 |
|
||||
| has\_mnode | DOUBLE | | dnode 是否包含 mnode,取值范围:包含=1,不包含=0 |
|
||||
| has\_qnode | DOUBLE | | dnode 是否包含 qnode,取值范围:包含=1,不包含=0 |
|
||||
| has\_snode | DOUBLE | | dnode 是否包含 snode,取值范围:包含=1,不包含=0 |
|
||||
| has\_bnode | DOUBLE | | dnode 是否包含 bnode,取值范围:包含=1,不包含=0 |
|
||||
| error\_log\_count | DOUBLE | | error 总数 |
|
||||
| info\_log\_count | DOUBLE | | info 总数 |
|
||||
| debug\_log\_count | DOUBLE | | debug 总数 |
|
||||
| trace\_log\_count | DOUBLE | | trace 总数 |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_dnodes\_status 表
|
||||
|
||||
`taosd_dnodes_status` 表记录 dnode 状态信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :--------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| status | DOUBLE | | dnode 状态,取值范围:ready=1,offline =0 |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_dnodes\_log\_dir 表
|
||||
|
||||
`taosd_dnodes_log_dir` 表记录 log 目录信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| avail | DOUBLE | | log 目录可用空间。单位 byte |
|
||||
| used | DOUBLE | | log 目录已使用空间。单位 byte |
|
||||
| total | DOUBLE | | log 目录空间。单位 byte |
|
||||
| name | VARCHAR | TAG | log 目录名,一般为 `/var/log/taos/` |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_dnodes\_data\_dir 表
|
||||
|
||||
`taosd_dnodes_data_dir` 表记录 data 目录信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :-------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| avail | DOUBLE | | data 目录可用空间。单位 byte |
|
||||
| used | DOUBLE | | data 目录已使用空间。单位 byte |
|
||||
| total | DOUBLE | | data 目录空间。单位 byte |
|
||||
| level | VARCHAR | TAG | 0、1、2 多级存储级别 |
|
||||
| name | VARCHAR | TAG | data 目录,一般为 `/var/lib/taos` |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_mnodes\_info 表
|
||||
|
||||
`taosd_mnodes_info` 表记录 mnode 角色信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :------------------------------------------------------------------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| role | DOUBLE | | mnode 角色, 取值范围:offline = 0,follower = 100,candidate = 101,leader = 102,error = 103,learner = 104 |
|
||||
| mnode\_id | VARCHAR | TAG | master node id |
|
||||
| mnode\_ep | VARCHAR | TAG | master node endpoint |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_vnodes\_role 表
|
||||
|
||||
`taosd_vnodes_role` 表记录虚拟节点角色信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------------- | :-------- | :------ | :------------------------------------------------------------------------------------------------------ |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| vnode\_role | DOUBLE | | vnode 角色,取值范围:offline = 0,follower = 100,candidate = 101,leader = 102,error = 103,learner = 104 |
|
||||
| vgroup\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| database\_name | VARCHAR | TAG | vgroup 所属的 database 名字 |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taosd\_sql\_req 表
|
||||
|
||||
`taosd_sql_req` 记录服务端 sql 请求信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :--------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| sql\_type | VARCHAR | TAG | sql类型,取值范围:inserted_rows |
|
||||
| dnode\_id | VARCHAR | TAG | dnode id |
|
||||
| dnode\_ep | VARCHAR | TAG | dnode endpoint |
|
||||
| vgroup\_id | VARCHAR | TAG | dnode id |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taos\_sql\_req 表
|
||||
|
||||
`taos_sql_req` 记录客户端 sql 请求信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| sql\_type | VARCHAR | TAG | sql类型,取值范围:select, insert,delete |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
### taos\_slow\_sql 表
|
||||
|
||||
`taos_slow_sql` 记录客户端慢查询信息。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :---------- | :-------- | :------ | :---------------------------------------------------- |
|
||||
| \_ts | TIMESTAMP | | timestamp |
|
||||
| count | DOUBLE | | sql 数量 |
|
||||
| result | VARCHAR | TAG | sql的执行结果,取值范围:Success, Failed |
|
||||
| username | VARCHAR | TAG | 执行sql的user name |
|
||||
| duration | VARCHAR | TAG | sql执行耗时,取值范围:3-10s,10-100s,100-1000s,1000s- |
|
||||
| cluster\_id | VARCHAR | TAG | cluster id |
|
||||
|
||||
|
|
|
@ -289,31 +289,32 @@ http 返回内容:
|
|||
|
||||
## taosAdapter 监控指标
|
||||
|
||||
taosAdapter 采集 http 相关指标、CPU 百分比和内存百分比。
|
||||
taosAdapter 采集 REST/Websocket 相关请求的监控指标。将监控指标上报给 taosKeeper,这些监控指标会被 taosKeeper 写入监控数据库,默认是 `log` 库,可以在 taoskeeper 配置文件中修改。以下是这些监控指标的详细介绍。
|
||||
|
||||
### http 接口
|
||||
#### adapter\_requests 表
|
||||
|
||||
提供符合 [OpenMetrics](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md) 接口:
|
||||
`adapter_requests` 记录 taosadapter 监控数据。
|
||||
|
||||
```text
|
||||
http://<fqdn>:6041/metrics
|
||||
```
|
||||
|
||||
### 写入 TDengine
|
||||
|
||||
taosAdapter 支持将 http 监控、CPU 百分比和内存百分比写入 TDengine。
|
||||
|
||||
有关配置参数
|
||||
|
||||
| **配置项** | **描述** | **默认值** |
|
||||
|-------------------------|--------------------------------------------|----------|
|
||||
| monitor.collectDuration | CPU 和内存采集间隔 | 3s |
|
||||
| monitor.identity | 当前taosadapter 的标识符如果不设置将使用 'hostname:port' | |
|
||||
| monitor.incgroup | 是否是 cgroup 中运行(容器中运行设置为 true) | false |
|
||||
| monitor.writeToTD | 是否写入到 TDengine | false |
|
||||
| monitor.user | TDengine 连接用户名 | root |
|
||||
| monitor.password | TDengine 连接密码 | taosdata |
|
||||
| monitor.writeInterval | 写入TDengine 间隔 | 30s |
|
||||
| field | type | is\_tag | comment |
|
||||
| :----------------- | :----------- | :------ | :---------------------------------- |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| total | INT UNSIGNED | | 总请求数 |
|
||||
| query | INT UNSIGNED | | 查询请求数 |
|
||||
| write | INT UNSIGNED | | 写入请求数 |
|
||||
| other | INT UNSIGNED | | 其他请求数 |
|
||||
| in\_process | INT UNSIGNED | | 正在处理请求数 |
|
||||
| success | INT UNSIGNED | | 成功请求数 |
|
||||
| fail | INT UNSIGNED | | 失败请求数 |
|
||||
| query\_success | INT UNSIGNED | | 查询成功请求数 |
|
||||
| query\_fail | INT UNSIGNED | | 查询失败请求数 |
|
||||
| write\_success | INT UNSIGNED | | 写入成功请求数 |
|
||||
| write\_fail | INT UNSIGNED | | 写入失败请求数 |
|
||||
| other\_success | INT UNSIGNED | | 其他成功请求数 |
|
||||
| other\_fail | INT UNSIGNED | | 其他失败请求数 |
|
||||
| query\_in\_process | INT UNSIGNED | | 正在处理查询请求数 |
|
||||
| write\_in\_process | INT UNSIGNED | | 正在处理写入请求数 |
|
||||
| endpoint | VARCHAR | | 请求端点 |
|
||||
| req\_type | NCHAR | TAG | 请求类型:0 为 REST,1 为 Websocket |
|
||||
|
||||
## 结果返回条数限制
|
||||
|
||||
|
@ -342,11 +343,11 @@ taosAdapter 从 3.0.4.0 版本开始,提供参数 `smlAutoCreateDB` 来控制
|
|||
|
||||
在 TDengine server 2.2.x.x 或更早期版本中,taosd 进程包含一个内嵌的 http 服务。如前面所述,taosAdapter 是一个使用 systemd 管理的独立软件,拥有自己的进程。并且两者有一些配置参数和行为是不同的,请见下表:
|
||||
|
||||
| **#** | **embedded httpd** | **taosAdapter** | **comment** |
|
||||
|-------|---------------------|-------------------------------|------------------------------------------------------------------------------------------------|
|
||||
| 1 | httpEnableRecordSql | --logLevel=debug | |
|
||||
| 2 | httpMaxThreads | n/a | taosAdapter 自动管理线程池,无需此参数 |
|
||||
| **#** | **embedded httpd** | **taosAdapter** | **comment** |
|
||||
| ----- | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 1 | httpEnableRecordSql | --logLevel=debug | |
|
||||
| 2 | httpMaxThreads | n/a | taosAdapter 自动管理线程池,无需此参数 |
|
||||
| 3 | telegrafUseFieldNum | 请参考 taosAdapter telegraf 配置方法 |
|
||||
| 4 | restfulRowLimit | restfulRowLimit | 内嵌 httpd 默认输出 10240 行数据,最大允许值为 102400。taosAdapter 也提供 restfulRowLimit 但是默认不做限制。您可以根据实际场景需求进行配置 |
|
||||
| 5 | httpDebugFlag | 不适用 | httpdDebugFlag 对 taosAdapter 不起作用 |
|
||||
| 6 | httpDBNameMandatory | 不适用 | taosAdapter 要求 URL 中必须指定数据库名 |
|
||||
| 4 | restfulRowLimit | restfulRowLimit | 内嵌 httpd 默认输出 10240 行数据,最大允许值为 102400。taosAdapter 也提供 restfulRowLimit 但是默认不做限制。您可以根据实际场景需求进行配置 |
|
||||
| 5 | httpDebugFlag | 不适用 | httpdDebugFlag 对 taosAdapter 不起作用 |
|
||||
| 6 | httpDBNameMandatory | 不适用 | taosAdapter 要求 URL 中必须指定数据库名 |
|
||||
|
|
|
@ -90,11 +90,11 @@ taosx privileges -i ./user-pass-privileges-backup.json -t "taos:///"
|
|||
|
||||
可用参数列表:
|
||||
|
||||
| 参数 | 说明 |
|
||||
| ---- | ---- |
|
||||
| -u | 包含用户基本信息(密码、是否启用等) |
|
||||
| -p | 包含权限信息 |
|
||||
| -w | 包含白名单信息 |
|
||||
| 参数 | 说明 |
|
||||
| ---- | ------------------------------------ |
|
||||
| -u | 包含用户基本信息(密码、是否启用等) |
|
||||
| -p | 包含权限信息 |
|
||||
| -w | 包含白名单信息 |
|
||||
|
||||
当 `-u`/`-p` 参数应用时,将仅包含指定的信息,不带参数时,表示所有信息(用户名、密码、权限和白名单)。
|
||||
|
||||
|
@ -324,4 +324,131 @@ Linux 下 `journalctl` 查看日志的命令如下:
|
|||
|
||||
```bash
|
||||
journalctl -u taosx [-f]
|
||||
```
|
||||
```
|
||||
|
||||
## taosX 监控指标
|
||||
|
||||
taosX 会将监控指标上报给 taosKeeper,这些监控指标会被 taosKeeper 写入监控数据库,默认是 `log` 库,可以在 taoskeeper 配置文件中修改。以下是这些监控指标的详细介绍。
|
||||
|
||||
### taosX 服务监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| -------------------------- | ----------------------------------------------------------------------------- |
|
||||
| sys_cpu_cores | 系统 CPU 核数 |
|
||||
| sys_total_memory | 系统总内存,单位:字节 |
|
||||
| sys_used_memory | 系统已用内存, 单位:字节 |
|
||||
| sys_available_memory | 系统可用内存, 单位:字节 |
|
||||
| process_uptime | taosX 运行时长,单位:秒 |
|
||||
| process_id | taosX 进程 ID |
|
||||
| running_tasks | taosX 当前执行任务数 |
|
||||
| completed_tasks | taosX 进程在一个监控周期(比如10s)内完成的任务数 |
|
||||
| failed_tasks | taosX 进程在一个监控周期(比如10s)内失败的任务数 |
|
||||
| process_cpu_percent | taosX 进程占用 CPU 百分比, 单位 % |
|
||||
| process_memory_percent | taosX 进程占用内存百分比, 单位 % |
|
||||
| process_disk_read_bytes | taosX 进程在一个监控周期(比如10s)内从硬盘读取的字节数的平均值,单位 bytes/s |
|
||||
| process_disk_written_bytes | taosX 进程在一个监控周期(比如10s)内写到硬盘的字节数的平均值,单位 bytres/s |
|
||||
|
||||
|
||||
### Agent 监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| -------------------------- | ----------------------------------------------------------------------------- |
|
||||
| sys_cpu_cores | 系统 CPU 核数 |
|
||||
| sys_total_memory | 系统总内存,单位:字节 |
|
||||
| sys_used_memory | 系统已用内存, 单位:字节 |
|
||||
| sys_available_memory | 系统可用内存, 单位:字节 |
|
||||
| process_uptime | agent 运行时长,单位:秒 |
|
||||
| process_id | agent 进程 id |
|
||||
| process_cpu_percent | agent 进程占用 CPU 百分比 |
|
||||
| process_memory_percent | agent 进程占用内存百分比 |
|
||||
| process_uptime | 进程启动时间,单位秒 |
|
||||
| process_disk_read_bytes | agent 进程在一个监控周期(比如10s)内从硬盘读取的字节数的平均值,单位 bytes/s |
|
||||
| process_disk_written_bytes | agent 进程在一个监控周期(比如10s)内写到硬盘的字节数的平均值,单位 bytes/s |
|
||||
|
||||
### Connector 监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| -------------------------- | --------------------------------------------------------------------------------- |
|
||||
| process_id | connector 进程 id |
|
||||
| process_uptime | 进程启动时间,单位秒 |
|
||||
| process_cpu_percent | 进程占用 CPU 百分比, 单位 % |
|
||||
| process_memory_percent | 进程占用内存百分比, 单位 % |
|
||||
| process_disk_read_bytes | connector 进程在一个监控周期(比如10s)内从硬盘读取的字节数的平均值,单位 bytes/s |
|
||||
| process_disk_written_bytes | connector 进程在一个监控周期(比如10s)内写到硬盘的字节数的平均值,单位 bytes/s |
|
||||
|
||||
### taosX 通用数据源任务监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| -------------------- | --------------------------------------------------------------- |
|
||||
| total_execute_time | 任务累计运行时间,单位毫秒 |
|
||||
| total_written_rowsls | 成功写入 TDengine 的总行数(包括重复记录) |
|
||||
| total_written_points | 累计写入成功点数 (等于数据块包含的行数乘以数据块包含的列数) |
|
||||
| start_time | 任务启动时间 (每次重启任务会被重置) |
|
||||
| written_rows | 本次运行此任务成功写入 TDengine 的总行数(包括重复记录) |
|
||||
| written_points | 本次运行写入成功点数 (等于数据块包含的行数乘以数据块包含的列数) |
|
||||
| execute_time | 任务本次运行时间,单位秒 |
|
||||
|
||||
### taosX TDengine V2 任务监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| --------------------- | -------------------------------------------------------------------- |
|
||||
| read_concurrency | 并发读取数据源的数据 worker 数, 也等于并发写入 TDengine 的 worker 数 |
|
||||
| total_stables | 需要迁移的超级表数据数量 |
|
||||
| total_updated_tags | 累计更新 tag 数 |
|
||||
| total_created_tables | 累计创建子表数 |
|
||||
| total_tables | 需要迁移的子表数量 |
|
||||
| total_finished_tables | 完成数据迁移的子表数 (任务中断重启可能大于实际值) |
|
||||
| total_success_blocks | 累计写入成功的数据块数 |
|
||||
| finished_tables | 本次运行完成迁移子表数 |
|
||||
| success_blocks | 本次写入成功的数据块数 |
|
||||
| created_tables | 本次运行创建子表数 |
|
||||
| updated_tags | 本次运行更新 tag 数 |
|
||||
|
||||
### taosX TDengine V3 任务监控指标
|
||||
|
||||
| 字段 | 描述 |
|
||||
| ---------------------- | ------------------------------------------------------- |
|
||||
| total_messages | 通过 TMQ 累计收到的消息总数 |
|
||||
| total_messages_of_meta | 通过 TMQ 累计收到的 Meta 类型的消息总数 |
|
||||
| total_messages_of_data | 通过 TMQ 累计收到的 Data 和 MetaData 类型的消息总数 |
|
||||
| total_write_raw_fails | 累计写入 raw meta 失败的次数 |
|
||||
| total_success_blocks | 累计写入成功的数据块数 |
|
||||
| topics | 通过 TMQ 订阅的主题数 |
|
||||
| consumers | TMQ 消费者数 |
|
||||
| messages | 本次运行通过 TMQ 收到的消息总数 |
|
||||
| messages_of_meta | 本次运行通过 TMQ 收到的 Meta 类型的消息总数 |
|
||||
| messages_of_data | 本次运行通过 TMQ 收到的 Data 和 MetaData 类型的消息总数 |
|
||||
| write_raw_fails | 本次运行写入 raw meta 失败的次数 |
|
||||
| success_blocks | 本次写入成功的数据块数 |
|
||||
|
||||
|
||||
### taosX 其他数据源 任务监控指标
|
||||
|
||||
这些数据源包括: InfluxDB,OpenTSDB,OPC UA,OPC DA,PI,CSV,MQTT,AVEVA Historian 和 Kafka。
|
||||
|
||||
| 字段 | 描述 |
|
||||
| ----------------------- | ----------------------------------------------------------- |
|
||||
| total_received_batches | 通过 IPC Stream 收到的数据总批数 |
|
||||
| total_processed_batches | 已经处理的批数 |
|
||||
| total_processed_rows | 已经处理的总行数(等于每批包含数据行数之和) |
|
||||
| total_inserted_sqls | 执行的 INSERT SQL 总条数 |
|
||||
| total_failed_sqls | 执行失败的 INSERT SQL 总条数 |
|
||||
| total_created_stables | 创建的超级表总数(可能大于实际值) |
|
||||
| total_created_tables | 尝试创建子表总数(可能大于实际值) |
|
||||
| total_failed_rows | 写入失败的总行数 |
|
||||
| total_failed_point | 写入失败的总点数 |
|
||||
| total_written_blocks | 写入成功的 raw block 总数 |
|
||||
| total_failed_blocks | 写入失败的 raw block 总数 |
|
||||
| received_batches | 本次运行此任务通过 IPC Stream 收到的数据总批数 |
|
||||
| processed_batches | 本次运行已处理批数 |
|
||||
| processed_rows | 本次处理的总行数(等于包含数据的 batch 包含的数据行数之和) |
|
||||
| received_records | 本次运行此任务通过 IPC Stream 收到的数据总行数 |
|
||||
| inserted_sqls | 本次运行此任务执行的 INSERT SQL 总条数 |
|
||||
| failed_sqls | 本次运行此任务执行失败的 INSERT SQL 总条数 |
|
||||
| created_stables | 本次运行此任务尝试创建超级表数(可能大于实际值) |
|
||||
| created_tables | 本次运行此任务尝试创建子表数(可能大于实际值) |
|
||||
| failed_rows | 本次运行此任务写入失败的行数 |
|
||||
| failed_points | 本次运行此任务写入失败的点数 |
|
||||
| written_blocks | 本次运行此任务写人成功的 raw block 数 |
|
||||
| failed_blocks | 本次运行此任务写入失败的 raw block 数 |
|
||||
|
||||
|
|
|
@ -317,3 +317,19 @@ scrape_configs:
|
|||
|
||||
在 Grafana Dashboard 菜单点击 `import`,dashboard ID 填写 `18587`,点击 `Load` 按钮即可导入 `TaosKeeper Prometheus Dashboard for 3.x` dashboard。
|
||||
|
||||
|
||||
|
||||
## taosKeeper 监控指标
|
||||
|
||||
taosKeeper 也会将自己采集的监控数据写入监控数据库,默认是 `log` 库,可以在 taoskeeper 配置文件中修改。
|
||||
|
||||
### keeper\_monitor 表
|
||||
|
||||
`keeper_monitor` 记录 taoskeeper 监控数据。
|
||||
|
||||
| field | type | is\_tag | comment |
|
||||
| :------- | :-------- | :------ | :----------- |
|
||||
| ts | TIMESTAMP | | timestamp |
|
||||
| cpu | DOUBLE | | cpu 使用率 |
|
||||
| mem | DOUBLE | | 内存使用率 |
|
||||
| identify | NCHAR | TAG | 身份标识信息 |
|
||||
|
|
Loading…
Reference in New Issue