docs: update taosAdapter doc
This commit is contained in:
parent
ab0e3b2b67
commit
c70fcdc884
|
@ -24,6 +24,8 @@ The architecture diagram is as follows:
|
||||||
|
|
||||||
## Feature List
|
## Feature List
|
||||||
|
|
||||||
|
The taosAdapter provides the following features:
|
||||||
|
|
||||||
- WebSocket Interface:
|
- WebSocket Interface:
|
||||||
Supports executing SQL, schemaless writing, parameter binding, and data subscription through the WebSocket protocol.
|
Supports executing SQL, schemaless writing, parameter binding, and data subscription through the WebSocket protocol.
|
||||||
- Compatible with InfluxDB v1 write interface:
|
- Compatible with InfluxDB v1 write interface:
|
||||||
|
@ -228,13 +230,14 @@ See the example configuration file at [example/config/taosadapter.toml](https://
|
||||||
|
|
||||||
### Cross-Origin Configuration
|
### Cross-Origin Configuration
|
||||||
|
|
||||||
When using the RESTful API, the system will manage TDengine connections through a connection pool. The connection pool can be configured with the following parameters:
|
When making API calls from the browser, please configure the following Cross-Origin Resource Sharing (CORS) parameters based on your actual situation:
|
||||||
|
|
||||||
- **`pool.maxConnect`**: The maximum number of connections allowed in the pool, default is twice the number of CPU cores. It is recommended to keep the default setting.
|
- **`cors.allowAllOrigins`**: Whether to allow all origins to access, default is true.
|
||||||
- **`pool.maxIdle`**: The maximum number of idle connections in the pool, default is the same as `pool.maxConnect`. It is recommended to keep the default setting.
|
- **`cors.allowOrigins`**: A comma-separated list of origins allowed to access. Multiple origins can be specified.
|
||||||
- **`pool.idleTimeout`**: Connection idle timeout, default is never timeout. It is recommended to keep the default setting.
|
- **`cors.allowHeaders`**: A comma-separated list of request headers allowed for cross-origin access. Multiple headers can be specified.
|
||||||
- **`pool.waitTimeout`**: Timeout for obtaining a connection from the pool, default is set to 60 seconds. If a connection is not obtained within the timeout period, HTTP status code 503 will be returned. This parameter is available starting from version 3.3.3.0.
|
- **`cors.exposeHeaders`**: A comma-separated list of response headers exposed for cross-origin access. Multiple headers can be specified.
|
||||||
- **`pool.maxWait`**: The maximum number of requests waiting to get a connection in the pool, default is 0, which means no limit. When the number of queued requests exceeds this value, new requests will return HTTP status code 503. This parameter is available starting from version 3.3.3.0.
|
- **`cors.allowCredentials`**: Whether to allow cross-origin requests to include user credentials, such as cookies, HTTP authentication information, or client SSL certificates.
|
||||||
|
- **`cors.allowWebSockets`**: Whether to allow WebSockets connections.
|
||||||
|
|
||||||
If you are not making API calls through a browser, you do not need to worry about these configurations.
|
If you are not making API calls through a browser, you do not need to worry about these configurations.
|
||||||
|
|
||||||
|
@ -253,11 +256,11 @@ taosAdapter uses a connection pool to manage connections to TDengine, improving
|
||||||
|
|
||||||
* RESTful API requests
|
* RESTful API requests
|
||||||
* InfluxDB v1 write interface
|
* InfluxDB v1 write interface
|
||||||
* OpenTSDB JSON and telnet format writes
|
* OpenTSDB JSON and telnet format writing
|
||||||
* Telegraf data writes
|
* Telegraf data writing
|
||||||
* collectd data writes
|
* collectd data writing
|
||||||
* StatsD data writes
|
* StatsD data writing
|
||||||
* node_exporter data collection writes
|
* node_exporter data collection writing
|
||||||
* Prometheus remote_read and remote_write
|
* Prometheus remote_read and remote_write
|
||||||
|
|
||||||
The configuration parameters for the connection pool are as follows:
|
The configuration parameters for the connection pool are as follows:
|
||||||
|
@ -336,11 +339,11 @@ Starting from **version 3.0.4.0**, taosAdapter provides the parameter `smlAutoCr
|
||||||
The `smlAutoCreateDB` parameter only affects the following interfaces:
|
The `smlAutoCreateDB` parameter only affects the following interfaces:
|
||||||
|
|
||||||
- InfluxDB v1 write interface
|
- InfluxDB v1 write interface
|
||||||
- OpenTSDB JSON and telnet format write
|
- OpenTSDB JSON and telnet format writing
|
||||||
- Telegraf data write
|
- Telegraf data writing
|
||||||
- collectd data write
|
- collectd data writing
|
||||||
- StatsD data write
|
- StatsD data writing
|
||||||
- node_exporter data write
|
- node_exporter data writing
|
||||||
|
|
||||||
**Parameter Description**
|
**Parameter Description**
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ password = "taosdata"
|
||||||
|
|
||||||
其中 taosAdapter 默认写入的数据库名称为 `collectd`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
其中 taosAdapter 默认写入的数据库名称为 `collectd`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
||||||
|
|
||||||
- 也可以使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 collectd 数据功能,具体细节请参考 taosAdapter 的参考手册
|
- 使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 collectd 数据功能,具体细节请参考 taosAdapter 的参考手册。
|
||||||
|
|
||||||
#### 配置 collectd
|
#### 配置 collectd
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ password = "taosdata"
|
||||||
|
|
||||||
其中 taosAdapter 默认写入的数据库名称为 `icinga2`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过 taosAdapter 需重新启动。
|
其中 taosAdapter 默认写入的数据库名称为 `icinga2`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过 taosAdapter 需重新启动。
|
||||||
|
|
||||||
- 也可以使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 icinga2 数据功能,具体细节请参考 taosAdapter 的参考手册
|
- 使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 icinga2 数据功能,具体细节请参考 taosAdapter 的参考手册
|
||||||
|
|
||||||
#### 配置 icinga2
|
#### 配置 icinga2
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ deleteTimings = true
|
||||||
|
|
||||||
其中 taosAdapter 默认写入的数据库名称为 `statsd`,也可以修改 taosAdapter 配置文件 db 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
其中 taosAdapter 默认写入的数据库名称为 `statsd`,也可以修改 taosAdapter 配置文件 db 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
||||||
|
|
||||||
- 也可以使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 StatsD 数据功能,具体细节请参考 taosAdapter 的参考手册
|
- 使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 StatsD 数据功能,具体细节请参考 taosAdapter 的参考手册
|
||||||
|
|
||||||
#### 配置 StatsD
|
#### 配置 StatsD
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ password = "taosdata"
|
||||||
|
|
||||||
其中 taosAdapter 默认写入的数据库名称为 `tcollector`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
其中 taosAdapter 默认写入的数据库名称为 `tcollector`,也可以修改 taosAdapter 配置文件 dbs 项来指定不同的名称。user 和 password 填写实际 TDengine 配置的值。修改过配置文件 taosAdapter 需重新启动。
|
||||||
|
|
||||||
- 也可以使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 tcollector 数据功能,具体细节请参考 taosAdapter 的参考手册
|
- 使用 taosAdapter 命令行参数或设置环境变量启动的方式,使能 taosAdapter 接收 tcollector 数据功能,具体细节请参考 taosAdapter 的参考手册
|
||||||
|
|
||||||
#### 配置 TCollector
|
#### 配置 TCollector
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue