Skip to main content

taosAdapter Reference

taosAdapter is a companion tool for TDengine, serving as a bridge and adapter between the TDengine cluster and applications. It provides an easy and efficient way to ingest data directly from data collection agents (such as Telegraf, StatsD, collectd, etc.). It also offers InfluxDB/OpenTSDB compatible data ingestion interfaces, allowing InfluxDB/OpenTSDB applications to be seamlessly ported to TDengine. The connectors of TDengine in various languages communicate with TDengine through the WebSocket interface, hence the taosAdapter must be installed.

The architecture diagram is as follows:

taosAdapter architecture

Manual Structure​

Feature List​

The taosAdapter provides the following features:

See Data Ingestion Interfaces for details on each interface.

Installation​

taosAdapter is part of the TDengine server software. If you are using TDengine server, you do not need any additional steps to install taosAdapter. If you need to deploy taosAdapter separately from the TDengine server, you should install the complete TDengine on that server to install taosAdapter. If you need to compile taosAdapter from source code, you can refer to the Build taosAdapter document.

After the installation is complete, you can start the taosAdapter service using the command systemctl start taosadapter.

Service Management​

Starting/Stopping taosAdapter​

On Linux systems, the taosAdapter service is managed by default by systemd. Use the command systemctl start taosadapter to start the taosAdapter service. Use the command systemctl stop taosadapter to stop the taosAdapter service.

Upgrading taosAdapter​

taosAdapter and TDengine server need to use the same version. Please upgrade taosAdapter by upgrading the TDengine server. taosAdapter deployed separately from taosd must be upgraded by upgrading the TDengine server on its server.

Removing taosAdapter​

Use the command rmtaos to remove the TDengine server software, including taosAdapter.

Dynamic Configuration​

Dynamically Modify Log Level​

Starting from 3.3.5.0 version, taosAdapter supports dynamic modification of log level through HTTP interface. Users can dynamically adjust the log level by sending HTTP PUT request to /config interface. The authentication method of this interface is the same as /rest/sql interface, and the configuration item key-value pair in JSON format must be passed in the request body.

The following is an example of setting the log level to debug through the curl command:

curl --location --request PUT 'http://127.0.0.1:6041/config' \
-u root:taosdata \
--data '{"log.level": "debug"}'

Monitor Configuration File Changes​

Starting from version 3.3.6.34/3.4.0.0, taosAdapter supports monitoring configuration file changes and automatically updates the following configurations:

  • log.level log level parameter
  • rejectQuerySqlRegex rejected query SQL list configuration parameter

IPv6 Support​

Starting from version 3.3.6.13, taosAdapter supports IPv6. No additional configuration is required. taosAdapter automatically detects the system's IPv6 support: when available, it enables IPv6 and simultaneously listens on both IPv4 and IPv6 addresses.

Changes after upgrading httpd to taosAdapter​

In TDengine server version 2.2.x.x or earlier, the taosd process included an embedded HTTP service(httpd). As mentioned earlier, taosAdapter is a standalone software managed by systemd, having its own process. Moreover, there are some differences in configuration parameters and behaviors between the two, as shown in the table below:

#embedded httpdtaosAdaptercomment
1httpEnableRecordSql--logLevel=debug
2httpMaxThreadsn/ataosAdapter automatically manages the thread pool, this parameter is not needed
3telegrafUseFieldNumPlease refer to taosAdapter telegraf configuration methods
4restfulRowLimitrestfulRowLimitThe embedded httpd defaults to outputting 10240 rows of data, with a maximum allowable value of 102400. taosAdapter also provides restfulRowLimit but does not impose a limit by default. You can configure it according to actual scenario needs.
5httpDebugFlagNot applicablehttpdDebugFlag does not affect taosAdapter
6httpDBNameMandatoryNot applicabletaosAdapter requires the database name to be specified in the URL