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:

Figure 1. taosAdapter architecture

Feature List

The taosAdapter provides the following features:

WebSocket Interface

Through the WebSocket interface of taosAdapter, connectors in various languages can achieve SQL execution, schemaless writing, parameter binding, and data subscription functionalities. Refer to the Development Guide for more details.

InfluxDB v1 write interface

You can use any client that supports the HTTP protocol to write data in InfluxDB compatible format to TDengine by accessing the Restful interface URL http://<fqdn>:6041/influxdb/v1/write.

Supported InfluxDB parameters are as follows:

  • db specifies the database name used by TDengine
  • precision the time precision used by TDengine
  • u TDengine username
  • p TDengine password
  • ttl the lifespan of automatically created subtables, determined by the TTL parameter of the first data entry in the subtable, which cannot be updated. For more information, please refer to the TTL parameter in the table creation document.

Note: Currently, InfluxDB's token authentication method is not supported, only Basic authentication and query parameter verification are supported. Example: curl --request POST http://127.0.0.1:6041/influxdb/v1/write?db=test --user "root:taosdata" --data-binary "measurement,host=host1 field1=2i,field2=2.0 1577836800000000000"

OpenTSDB JSON and telnet format writing

You can use any client that supports the HTTP protocol to write data in OpenTSDB compatible format to TDengine by accessing the Restful interface URL http://<fqdn>:6041/<APIEndPoint>. EndPoint as follows:

/opentsdb/v1/put/json/<db>
/opentsdb/v1/put/telnet/<db>

collectd data writing

Configuring taosAdapter

Method to configure taosAdapter to receive collectd data:

  • Enable the configuration item in the taosAdapter configuration file (default location is /etc/taos/taosadapter.toml)

    ...
    [opentsdb_telnet]
    enable = true
    maxTCPConnections = 250
    tcpKeepAlive = false
    dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
    ports = [6046, 6047, 6048, 6049]
    user = "root"
    password = "taosdata"
    ...

    The default database name written by taosAdapter is collectd, but you can also modify the dbs item in the taosAdapter configuration file to specify a different name. Fill in user and password with the actual TDengine configuration values. After modifying the configuration file, taosAdapter needs to be restarted.

  • You can also use taosAdapter command line parameters or set environment variables to start, to enable taosAdapter to receive collectd data, for more details please refer to the taosAdapter reference manual.

Configuring collectd

collectd uses a plugin mechanism that can write the collected monitoring data to different data storage software in various forms. TDengine supports direct collection plugins and write_tsdb plugins.

  1. Configuring to receive direct collection plugin data

    Modify the related configuration items in the collectd configuration file (default location /etc/collectd/collectd.conf).

    LoadPlugin network
    <Plugin network>
    Server "<taosAdapter's host>" "<port for collectd direct>"
    </Plugin>

    Where <taosAdapter's host> should be filled with the domain name or IP address of the server running taosAdapter. <port for collectd direct> should be filled with the port used by taosAdapter to receive collectd data (default is 6045).

    Example as follows:

    LoadPlugin network
    <Plugin network>
    Server "127.0.0.1" "6045"
    </Plugin>
  2. Configuring write_tsdb plugin data

    Modify the related configuration items in the collectd configuration file (default location /etc/collectd/collectd.conf).

    LoadPlugin write_tsdb
    <Plugin write_tsdb>
    <Node>
    Host "<taosAdapter's host>"
    Port "<port for collectd write_tsdb plugin>"
    ...
    </Node>
    </Plugin>

    Where <taosAdapter's host> should be filled with the domain name or IP address of the server running taosAdapter. <port for collectd write_tsdb plugin> should be filled with the port used by taosAdapter to receive collectd write_tsdb plugin data (default is 6047).

    LoadPlugin write_tsdb
    <Plugin write_tsdb>
    <Node>
    Host "127.0.0.1"
    Port "6047"
    HostTags "status=production"
    StoreRates false
    AlwaysAppendDS false
    </Node>
    </Plugin>

    Then restart collectd:

    systemctl restart collectd

StatsD data writing

Configure taosAdapter

Method to configure taosAdapter to receive StatsD data:

  • Enable the configuration item in the taosAdapter configuration file (default location /etc/taos/taosadapter.toml)

    ...
    [statsd]
    enable = true
    port = 6044
    db = "statsd"
    user = "root"
    password = "taosdata"
    worker = 10
    gatherInterval = "5s"
    protocol = "udp"
    maxTCPConnections = 250
    tcpKeepAlive = false
    allowPendingMessages = 50000
    deleteCounters = true
    deleteGauges = true
    deleteSets = true
    deleteTimings = true
    ...

    The default database name written by taosAdapter is statsd, but you can also modify the db item in the taosAdapter configuration file to specify a different name. Fill in the user and password with the actual TDengine configuration values. After modifying the configuration file, taosAdapter needs to be restarted.

  • You can also use taosAdapter command line arguments or set environment variables to enable the taosAdapter to receive StatsD data. For more details, please refer to the taosAdapter reference manual.

Configure StatsD

To use StatsD, download its source code. Modify its configuration file according to the example file exampleConfig.js found in the root directory of the local source code download. Replace <taosAdapter's host> with the domain name or IP address of the server running taosAdapter, and <port for StatsD> with the port that taosAdapter uses to receive StatsD data (default is 6044).

Add to the backends section "./backends/repeater"
Add to the repeater section { host:'<taosAdapter's host>', port: <port for StatsD>}

Example configuration file:

{
port: 8125
, backends: ["./backends/repeater"]
, repeater: [{ host: '127.0.0.1', port: 6044}]
}

After adding the following content, start StatsD (assuming the configuration file is modified to config.js).

npm install
node stats.js config.js &

icinga2 OpenTSDB writer data writing

Configuring taosAdapter

Method to configure taosAdapter to receive icinga2 data:

  • Enable the configuration item in the taosAdapter configuration file (default location /etc/taos/taosadapter.toml)

    ...
    [opentsdb_telnet]
    enable = true
    maxTCPConnections = 250
    tcpKeepAlive = false
    dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
    ports = [6046, 6047, 6048, 6049]
    user = "root"
    password = "taosdata"
    ...

    The default database name written by taosAdapter is icinga2, but you can also modify the dbs item in the taosAdapter configuration file to specify a different name. Fill in user and password with the actual TDengine configuration values. taosAdapter needs to be restarted after modifications.

  • You can also use taosAdapter command line parameters or set environment variables to enable taosAdapter to receive icinga2 data, for more details please refer to the taosAdapter reference manual

Configuring icinga2

  • Enable icinga2's opentsdb-writer (reference link https://icinga.com/docs/icinga-2/latest/doc/14-features/#opentsdb-writer)

  • Modify the configuration file /etc/icinga2/features-enabled/opentsdb.conf filling in <taosAdapter's host> with the domain name or IP address of the server running taosAdapter, <port for icinga2> with the corresponding port supported by taosAdapter for receiving icinga2 data (default is 6048)

    object OpenTsdbWriter "opentsdb" {
    host = "<taosAdapter's host>"
    port = <port for icinga2>
    }

    Example file:

    object OpenTsdbWriter "opentsdb" {
    host = "127.0.0.1"
    port = 6048
    }

TCollector data writing

Configuring taosAdapter

To configure taosAdapter to receive data from TCollector:

  • Enable the configuration in the taosAdapter configuration file (default location /etc/taos/taosadapter.toml)

    ...
    [opentsdb_telnet]
    enable = true
    maxTCPConnections = 250
    tcpKeepAlive = false
    dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
    ports = [6046, 6047, 6048, 6049]
    user = "root"
    password = "taosdata"
    ...

    The default database name that taosAdapter writes to is tcollector, but you can specify a different name by modifying the dbs option in the taosAdapter configuration file. Fill in the user and password with the actual values configured in TDengine. After modifying the configuration file, taosAdapter needs to be restarted.

  • You can also use taosAdapter command line arguments or set environment variables to enable the taosAdapter to receive tcollector data. For more details, please refer to the taosAdapter reference manual.

Configuring TCollector

To use TCollector, download its source code. Its configuration options are in its source code. Note: There are significant differences between different versions of TCollector; this only refers to the latest code in the current master branch (git commit: 37ae920).

Modify the contents of collectors/etc/config.py and tcollector.py. Change the original address pointing to the OpenTSDB host to the domain name or IP address where taosAdapter is deployed, and change the port to the corresponding port supported by taosAdapter for TCollector use (default is 6049).

Example of git diff output for source code modifications:

index e7e7a1c..ec3e23c 100644
--- a/collectors/etc/config.py
+++ b/collectors/etc/config.py
@@ -59,13 +59,13 @@ def get_defaults():
'http_password': False,
'reconnectinterval': 0,
'http_username': False,
- 'port': 4242,
+ 'port': 6049,
'pidfile': '/var/run/tcollector.pid',
'http': False,
'http_api_path': "api/put",
'tags': [],
'remove_inactive_collectors': False,
- 'host': '',
+ 'host': '127.0.0.1',
'logfile': '/var/log/tcollector.log',
'cdir': default_cdir,
'ssl': False,
diff --git a/tcollector.py b/tcollector.py
index 21f9b23..4c71ba2 100755
--- a/tcollector.py
+++ b/tcollector.py
@@ -64,7 +64,7 @@ ALIVE = True
# exceptions, something is not right and tcollector will shutdown.
# Hopefully some kind of supervising daemon will then restart it.
MAX_UNCAUGHT_EXCEPTIONS = 100
-DEFAULT_PORT = 4242
+DEFAULT_PORT = 6049
MAX_REASONABLE_TIMESTAMP = 2209212000 # Good until Tue 3 Jan 14:00:00 GMT 2040
# How long to wait for datapoints before assuming
# a collector is dead and restarting it
@@ -943,13 +943,13 @@ def parse_cmdline(argv):
'http_password': False,
'reconnectinterval': 0,
'http_username': False,
- 'port': 4242,
+ 'port': 6049,
'pidfile': '/var/run/tcollector.pid',
'http': False,
'http_api_path': "api/put",
'tags': [],
'remove_inactive_collectors': False,
- 'host': '',
+ 'host': '127.0.0.1',
'logfile': '/var/log/tcollector.log',
'cdir': default_cdir,
'ssl': False,

node_exporter data collection and writing

An exporter used by Prometheus that exposes hardware and operating system metrics from *NIX kernels

  • Enable configuration of taosAdapter node_exporter.enable
  • Set the relevant configuration for node_exporter
  • Restart taosAdapter

Supports Prometheus remote_read and remote_write

Configuring Prometheus is done by editing the Prometheus configuration file prometheus.yml (default location /etc/prometheus/prometheus.yml).

Configure Third-Party Database Address

Set the remote_read url and remote_write url to point to the domain name or IP address of the server running the taosAdapter service, the REST service port (taosAdapter defaults to 6041), and the name of the database you want to write to in TDengine, ensuring the URLs are formatted as follows:

  • remote_read url: http://<taosAdapter's host>:<REST service port>/prometheus/v1/remote_read/<database name>
  • remote_write url: http://<taosAdapter's host>:<REST service port>/prometheus/v1/remote_write/<database name>

Configure Basic Authentication

  • username: <TDengine's username>
  • password: <TDengine's password>

Example configuration of remote_write and remote_read in the prometheus.yml file

remote_write:
- url: "http://localhost:6041/prometheus/v1/remote_write/prometheus_data"
basic_auth:
username: root
password: taosdata

remote_read:
- url: "http://localhost:6041/prometheus/v1/remote_read/prometheus_data"
basic_auth:
username: root
password: taosdata
remote_timeout: 10s
read_recent: true

RESTful API

You can use any client that supports the HTTP protocol to write data to TDengine or query data from TDengine by accessing the RESTful interface URL http://<fqdn>:6041/rest/sql. For details, please refer to the REST API documentation.

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.

Configuration

taosAdapter supports configuration through command-line parameters, environment variables, and configuration files. The default configuration file is /etc/taos/taosadapter.toml, and you can specify the configuration file using the -c or --config command-line parameter..

Command-line parameters take precedence over environment variables, which take precedence over configuration files. The command-line usage is arg=val, such as taosadapter -p=30000 --debug=true.

See the example configuration file at example/config/taosadapter.toml.

Basic Configuration

The basic configuration parameters for taosAdapter are as follows:

  • debug: Whether to enable debug mode (pprof)

    • When set to true (default): Enables Go pprof debug mode, allowing access to debug information via http://<fqdn>:<port>/debug/pprof.
    • When set to false: Disables debug mode, preventing access to debug information.
  • instanceId: The instance ID of taosAdapter, used to distinguish logs from different instances. Default value: 32.

  • port: The port on which taosAdapter provides HTTP/WebSocket services. Default value: 6041.

  • taosConfigDir: The configuration file directory for TDengine. Default value: /etc/taos. The taos.cfg file in this directory will be loaded.

Starting from version 3.3.4.0, taosAdapter supports setting the number of concurrent calls for invoking C methods:

  • maxAsyncConcurrentLimit

    Sets the maximum number of concurrent calls for C asynchronous methods (0 means using the number of CPU cores).

  • maxSyncConcurrentLimit

    Sets the maximum number of concurrent calls for C synchronous methods (0 means using the number of CPU cores).

Cross-Origin Configuration

When making API calls from the browser, please configure the following Cross-Origin Resource Sharing (CORS) parameters based on your actual situation:

  • cors.allowAllOrigins: Whether to allow all origins to access, default is true.
  • cors.allowOrigins: A comma-separated list of origins allowed to access. Multiple origins can be specified.
  • cors.allowHeaders: A comma-separated list of request headers allowed for cross-origin access. Multiple headers can be specified.
  • cors.exposeHeaders: A comma-separated list of response headers exposed for cross-origin access. Multiple headers can be specified.
  • 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.

The above configurations take effect for the following interfaces:

  • RESTful API requests
  • WebSocket API requests
  • InfluxDB v1 write interface
  • OpenTSDB HTTP write interface

For details about the CORS protocol, please refer to: https://www.w3.org/wiki/CORS_Enabled or https://developer.mozilla.org/docs/Web/HTTP/CORS.

Connection Pool Configuration

taosAdapter uses a connection pool to manage connections to TDengine, improving concurrency performance and resource utilization. The connection pool configuration applies to the following interfaces, and these interfaces share a single connection pool:

  • RESTful API requests
  • InfluxDB v1 write interface
  • OpenTSDB JSON and telnet format writing
  • Telegraf data writing
  • collectd data writing
  • StatsD data writing
  • node_exporter data collection writing
  • Prometheus remote_read and remote_write

The configuration parameters for the connection pool are as follows:

  • 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.
  • 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.
  • pool.idleTimeout: Connection idle timeout, default is never timeout. It is recommended to keep the default setting.
  • 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.
  • 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.

HTTP Response Code Configuration

taosAdapter uses the parameter httpCodeServerError to set whether to return a non-200 HTTP status code when the C interface returns an error. When set to true, it will return different HTTP status codes based on the error code returned by C. See HTTP Response Codes for details.

This configuration only affects the RESTful interface.

Parameter Description:

  • httpCodeServerError:
    • When set to true: Map the error code returned by the C interface to the corresponding HTTP status code.
    • When set to false: Regardless of the error returned by the C interface, always return the HTTP status code 200 (default value).

Memory limit configuration

taosAdapter will monitor the memory usage during its operation and adjust it through two thresholds. The valid value range is an integer from 1 to 100, and the unit is the percentage of system physical memory.

This configuration only affects the following interfaces:

  • RESTful interface request
  • InfluxDB v1 write interface
  • OpenTSDB HTTP write interface
  • Prometheus remote_read and remote_write interfaces

Parameter Description

  • pauseQueryMemoryThreshold:
    • When memory usage exceeds this threshold, taosAdapter will stop processing query requests.
    • Default value: 70 (i.e. 70% of system physical memory).
  • pauseAllMemoryThreshold:
    • When memory usage exceeds this threshold, taosAdapter will stop processing all requests (including writes and queries).
    • Default value: 80 (i.e. 80% of system physical memory).

When memory usage falls below the threshold, taosAdapter will automatically resume the corresponding function.

HTTP return content

  • When pauseQueryMemoryThreshold is exceeded:

    • HTTP status code: 503
    • Return content: "query memory exceeds threshold"
  • When pauseAllMemoryThreshold is exceeded:

    • HTTP status code: 503
    • Return content: "memory exceeds threshold"

Status check interface

The memory status of taosAdapter can be checked through the following interface:

  • Normal status: http://<fqdn>:6041/-/ping returns code 200.
  • Memory exceeds threshold:
    • If the memory exceeds pauseAllMemoryThreshold, code 503 is returned.
    • If the memory exceeds pauseQueryMemoryThreshold and the request parameter contains action=query, code 503 is returned.
  • monitor.collectDuration: memory monitoring interval, default value is 3s, environment variable is TAOS_MONITOR_COLLECT_DURATION.
  • monitor.incgroup: whether to run in a container (set to true for running in a container), default value is false, environment variable is TAOS_MONITOR_INCGROUP.
  • monitor.pauseQueryMemoryThreshold: memory threshold (percentage) for query request pause, default value is 70, environment variable is TAOS_MONITOR_PAUSE_QUERY_MEMORY_THRESHOLD.
  • monitor.pauseAllMemoryThreshold: memory threshold (percentage) for query and write request pause, default value is 80, environment variable is TAOS_MONITOR_PAUSE_ALL_MEMORY_THRESHOLD.

You can make corresponding adjustments based on the specific project application scenario and operation strategy, and it is recommended to use operation monitoring software to monitor the system memory status in a timely manner. The load balancer can also check the operation status of taosAdapter through this interface.

Schemaless write create DB configuration

Starting from version 3.0.4.0, taosAdapter provides the parameter smlAutoCreateDB to control whether to automatically create a database (DB) when writing to the schemaless protocol.

The smlAutoCreateDB parameter only affects the following interfaces:

  • InfluxDB v1 write interface
  • OpenTSDB JSON and telnet format writing
  • Telegraf data writing
  • collectd data writing
  • StatsD data writing
  • node_exporter data writing

Parameter Description

  • smlAutoCreateDB:
    • When set to true: When writing to the schemaless protocol, if the target database does not exist, taosAdapter will automatically create the database.
    • When set to false: The user needs to manually create the database, otherwise the write will fail (default value).

Number of results returned configuration

taosAdapter provides the parameter restfulRowLimit to control the number of results returned by the HTTP interface.

The restfulRowLimit parameter only affects the return results of the following interfaces:

  • RESTful interface
  • Prometheus remote_read interface

Parameter Description

  • restfulRowLimit:
    • When set to a positive integer: The number of results returned by the interface will not exceed this value.
    • When set to -1: The number of results returned by the interface is unlimited (default value).

Log configuration

The log can be configured with the following parameters:

  • log.path

    Specifies the log storage path (Default: "/var/log/taos").

  • log.level

    Sets the log level (Default: "info").

  • log.keepDays

    Number of days to retain logs (Positive integer, Default: 30).

  • log.rotationCount

    Number of log files to rotate (Default: 30).

  • log.rotationSize

    Maximum size of a single log file (Supports KB/MB/GB units, Default: "1GB").

  • log.compress

    Whether to compress old log files (Default: false).

  • log.rotationTime

    Log rotation interval (Deprecated, fixed at 24-hour rotation).

  • log.reservedDiskSize

    Disk space reserved for log directory (Supports KB/MB/GB units, Default: "1GB").

  • log.enableRecordHttpSql

    Whether to record HTTP SQL requests (Default: false).

  • log.sqlRotationCount

    Number of SQL log files to rotate (Default: 2).

  • log.sqlRotationSize

    Maximum size of a single SQL log file (Supports KB/MB/GB units, Default: "1GB").

  • log.sqlRotationTime

    SQL log rotation interval (Default: 24h).

  1. You can set the taosAdapter log output detail level by setting the --log.level parameter or the environment variable TAOS_ADAPTER_LOG_LEVEL. Valid values ​​include: panic, fatal, error, warn, warning, info, debug, and trace.
  2. 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"}'

Third-party Data Source Configuration

Collectd Configuration

  • collectd.enable

    Enable/disable collectd protocol support (Default: false)

  • collectd.port

    Collectd service listening port (Default: 6045)

  • collectd.db

    Target database for collectd data (Default: "collectd")

  • collectd.user

    Database username (Default: "root")

  • collectd.password

    Database password (Default: "taosdata")

  • collectd.ttl

    Data time-to-live (Default: 0 = no expiration)

  • collectd.worker

    Number of write worker threads (Default: 10)

InfluxDB Configuration

  • influxdb.enable

    Enable/disable InfluxDB protocol support (Default: true)

Node Exporter Configuration

  • node_exporter.enable

    Enable node_exporter data collection (Default: false)

  • node_exporter.db

    Target database name (Default: "node_exporter")

  • node_exporter.urls

    Service endpoints (Default: ["http://localhost:9100"])

  • node_exporter.gatherDuration

    Collection interval (Default: 5s)

  • node_exporter.responseTimeout

    Request timeout (Default: 5s)

  • node_exporter.user

    Database username (Default: "root")

  • node_exporter.password

    Database password (Default: "taosdata")

  • node_exporter.ttl

    Data TTL (Default: 0)

  • node_exporter.httpUsername

    HTTP Basic Auth username (Optional)

  • node_exporter.httpPassword

    HTTP Basic Auth password (Optional)

  • node_exporter.httpBearerTokenString

    HTTP Bearer Token (Optional)

  • node_exporter.insecureSkipVerify

    Skip SSL verification (Default: true)

  • node_exporter.certFile

    Client certificate path (Optional)

  • node_exporter.keyFile

    Client key path (Optional)

  • node_exporter.caCertFile

    CA certificate path (Optional)

OpenTSDB Configuration

  • opentsdb.enable

    Enable OpenTSDB HTTP protocol (Default: true)

  • opentsdb_telnet.enable

    Enable OpenTSDB Telnet (Warning: no auth, Default: false)

  • opentsdb_telnet.ports

    Listening ports (Default: [6046,6047,6048,6049])

  • opentsdb_telnet.dbs

    Target databases (Default: ["opentsdb_telnet","collectd_tsdb","icinga2_tsdb","tcollector_tsdb"])

  • opentsdb_telnet.user

    Database username (Default: "root")

  • opentsdb_telnet.password

    Database password (Default: "taosdata")

  • opentsdb_telnet.ttl

    Data TTL (Default: 0)

  • opentsdb_telnet.batchSize

    Batch write size (Default: 1)

  • opentsdb_telnet.flushInterval

    Flush interval (Default: 0s)

  • opentsdb_telnet.maxTCPConnections

    Max TCP connections (Default: 250)

  • opentsdb_telnet.tcpKeepAlive

    Enable TCP KeepAlive (Default: false)

StatsD Configuration

  • statsd.enable

    Enable StatsD protocol (Default: false)

  • statsd.port

    Listening port (Default: 6044)

  • statsd.protocol

    Transport protocol (Options: tcp/udp/tcp4/udp4, Default: "udp4")

  • statsd.db

    Target database (Default: "statsd")

  • statsd.user

    Database username (Default: "root")

  • statsd.password

    Database password (Default: "taosdata")

  • statsd.ttl

    Data TTL (Default: 0)

  • statsd.gatherInterval

    Collection interval (Default: 5s)

  • statsd.worker

    Worker threads (Default: 10)

  • statsd.allowPendingMessages

    Max pending messages (Default: 50000)

  • statsd.maxTCPConnections

    Max TCP connections (Default: 250)

  • statsd.tcpKeepAlive

    Enable TCP KeepAlive (Default: false)

  • statsd.deleteCounters

    Clear counter cache after collection (Default: true)

  • statsd.deleteGauges

    Clear gauge cache after collection (Default: true)

  • statsd.deleteSets

    Clear sets cache after collection (Default: true)

  • statsd.deleteTimings

    Clear timings cache after collection (Default: true)

Prometheus Configuration

  • prometheus.enable

    Enable Prometheus protocol (Default: true)

Metrics Reporting Configuration

taosAdapter reports metrics to taosKeeper with these parameters:

  • uploadKeeper.enable

    Enable metrics reporting (Default: true)

  • uploadKeeper.url

    taosKeeper endpoint (Default: http://127.0.0.1:6043/adapter_report)

  • uploadKeeper.interval

    Reporting interval (Default: 15s)

  • uploadKeeper.timeout

    Request timeout (Default: 5s)

  • uploadKeeper.retryTimes

    Max retries (Default: 3)

  • uploadKeeper.retryInterval

    Retry interval (Default: 5s)

Environment Variables

Configuration Parameters and their corresponding environment variables:

Details
Configuration ParameterEnvironment Variable
collectd.dbTAOS_ADAPTER_COLLECTD_DB
collectd.enableTAOS_ADAPTER_COLLECTD_ENABLE
collectd.passwordTAOS_ADAPTER_COLLECTD_PASSWORD
collectd.portTAOS_ADAPTER_COLLECTD_PORT
collectd.ttlTAOS_ADAPTER_COLLECTD_TTL
collectd.userTAOS_ADAPTER_COLLECTD_USER
collectd.workerTAOS_ADAPTER_COLLECTD_WORKER
cors.allowAllOriginsTAOS_ADAPTER_CORS_ALLOW_ALL_ORIGINS
cors.allowCredentialsTAOS_ADAPTER_CORS_ALLOW_Credentials
cors.allowHeadersTAOS_ADAPTER_ALLOW_HEADERS
cors.allowOriginsTAOS_ADAPTER_ALLOW_ORIGINS
cors.allowWebSocketsTAOS_ADAPTER_CORS_ALLOW_WebSockets
cors.exposeHeadersTAOS_ADAPTER_Expose_Headers
debugTAOS_ADAPTER_DEBUG
httpCodeServerErrorTAOS_ADAPTER_HTTP_CODE_SERVER_ERROR
influxdb.enableTAOS_ADAPTER_INFLUXDB_ENABLE
instanceIdTAOS_ADAPTER_INSTANCE_ID
log.compressTAOS_ADAPTER_LOG_COMPRESS
log.enableRecordHttpSqlTAOS_ADAPTER_LOG_ENABLE_RECORD_HTTP_SQL
log.keepDaysTAOS_ADAPTER_LOG_KEEP_DAYS
log.levelTAOS_ADAPTER_LOG_LEVEL
log.pathTAOS_ADAPTER_LOG_PATH
log.reservedDiskSizeTAOS_ADAPTER_LOG_RESERVED_DISK_SIZE
log.rotationCountTAOS_ADAPTER_LOG_ROTATION_COUNT
log.rotationSizeTAOS_ADAPTER_LOG_ROTATION_SIZE
log.rotationTimeTAOS_ADAPTER_LOG_ROTATION_TIME
log.sqlRotationCountTAOS_ADAPTER_LOG_SQL_ROTATION_COUNT
log.sqlRotationSizeTAOS_ADAPTER_LOG_SQL_ROTATION_SIZE
log.sqlRotationTimeTAOS_ADAPTER_LOG_SQL_ROTATION_TIME
logLevelTAOS_ADAPTER_LOG_LEVEL
maxAsyncConcurrentLimitTAOS_ADAPTER_MAX_ASYNC_CONCURRENT_LIMIT
maxSyncConcurrentLimitTAOS_ADAPTER_MAX_SYNC_CONCURRENT_LIMIT
monitor.collectDurationTAOS_ADAPTER_MONITOR_COLLECT_DURATION
monitor.disableTAOS_ADAPTER_MONITOR_DISABLE
monitor.identityTAOS_ADAPTER_MONITOR_IDENTITY
monitor.incgroupTAOS_ADAPTER_MONITOR_INCGROUP
monitor.pauseAllMemoryThresholdTAOS_ADAPTER_MONITOR_PAUSE_ALL_MEMORY_THRESHOLD
monitor.pauseQueryMemoryThresholdTAOS_ADAPTER_MONITOR_PAUSE_QUERY_MEMORY_THRESHOLD
node_exporter.caCertFileTAOS_ADAPTER_NODE_EXPORTER_CA_CERT_FILE
node_exporter.certFileTAOS_ADAPTER_NODE_EXPORTER_CERT_FILE
node_exporter.dbTAOS_ADAPTER_NODE_EXPORTER_DB
node_exporter.enableTAOS_ADAPTER_NODE_EXPORTER_ENABLE
node_exporter.gatherDurationTAOS_ADAPTER_NODE_EXPORTER_GATHER_DURATION
node_exporter.httpBearerTokenStringTAOS_ADAPTER_NODE_EXPORTER_HTTP_BEARER_TOKEN_STRING
node_exporter.httpPasswordTAOS_ADAPTER_NODE_EXPORTER_HTTP_PASSWORD
node_exporter.httpUsernameTAOS_ADAPTER_NODE_EXPORTER_HTTP_USERNAME
node_exporter.insecureSkipVerifyTAOS_ADAPTER_NODE_EXPORTER_INSECURE_SKIP_VERIFY
node_exporter.keyFileTAOS_ADAPTER_NODE_EXPORTER_KEY_FILE
node_exporter.passwordTAOS_ADAPTER_NODE_EXPORTER_PASSWORD
node_exporter.responseTimeoutTAOS_ADAPTER_NODE_EXPORTER_RESPONSE_TIMEOUT
node_exporter.ttlTAOS_ADAPTER_NODE_EXPORTER_TTL
node_exporter.urlsTAOS_ADAPTER_NODE_EXPORTER_URLS
node_exporter.userTAOS_ADAPTER_NODE_EXPORTER_USER
opentsdb.enableTAOS_ADAPTER_OPENTSDB_ENABLE
opentsdb_telnet.batchSizeTAOS_ADAPTER_OPENTSDB_TELNET_BATCH_SIZE
opentsdb_telnet.dbsTAOS_ADAPTER_OPENTSDB_TELNET_DBS
opentsdb_telnet.enableTAOS_ADAPTER_OPENTSDB_TELNET_ENABLE
opentsdb_telnet.flushIntervalTAOS_ADAPTER_OPENTSDB_TELNET_FLUSH_INTERVAL
opentsdb_telnet.maxTCPConnectionsTAOS_ADAPTER_OPENTSDB_TELNET_MAX_TCP_CONNECTIONS
opentsdb_telnet.passwordTAOS_ADAPTER_OPENTSDB_TELNET_PASSWORD
opentsdb_telnet.portsTAOS_ADAPTER_OPENTSDB_TELNET_PORTS
opentsdb_telnet.tcpKeepAliveTAOS_ADAPTER_OPENTSDB_TELNET_TCP_KEEP_ALIVE
opentsdb_telnet.ttlTAOS_ADAPTER_OPENTSDB_TELNET_TTL
opentsdb_telnet.userTAOS_ADAPTER_OPENTSDB_TELNET_USER
pool.idleTimeoutTAOS_ADAPTER_POOL_IDLE_TIMEOUT
pool.maxConnectTAOS_ADAPTER_POOL_MAX_CONNECT
pool.maxIdleTAOS_ADAPTER_POOL_MAX_IDLE
pool.maxWaitTAOS_ADAPTER_POOL_MAX_WAIT
pool.waitTimeoutTAOS_ADAPTER_POOL_WAIT_TIMEOUT
P, portTAOS_ADAPTER_PORT
prometheus.enableTAOS_ADAPTER_PROMETHEUS_ENABLE
restfulRowLimitTAOS_ADAPTER_RESTFUL_ROW_LIMIT
smlAutoCreateDBTAOS_ADAPTER_SML_AUTO_CREATE_DB
statsd.allowPendingMessagesTAOS_ADAPTER_STATSD_ALLOW_PENDING_MESSAGES
statsd.dbTAOS_ADAPTER_STATSD_DB
statsd.deleteCountersTAOS_ADAPTER_STATSD_DELETE_COUNTERS
statsd.deleteGaugesTAOS_ADAPTER_STATSD_DELETE_GAUGES
statsd.deleteSetsTAOS_ADAPTER_STATSD_DELETE_SETS
statsd.deleteTimingsTAOS_ADAPTER_STATSD_DELETE_TIMINGS
statsd.enableTAOS_ADAPTER_STATSD_ENABLE
statsd.gatherIntervalTAOS_ADAPTER_STATSD_GATHER_INTERVAL
statsd.maxTCPConnectionsTAOS_ADAPTER_STATSD_MAX_TCP_CONNECTIONS
statsd.passwordTAOS_ADAPTER_STATSD_PASSWORD
statsd.portTAOS_ADAPTER_STATSD_PORT
statsd.protocolTAOS_ADAPTER_STATSD_PROTOCOL
statsd.tcpKeepAliveTAOS_ADAPTER_STATSD_TCP_KEEP_ALIVE
statsd.ttlTAOS_ADAPTER_STATSD_TTL
statsd.userTAOS_ADAPTER_STATSD_USER
statsd.workerTAOS_ADAPTER_STATSD_WORKER
taosConfigDirTAOS_ADAPTER_TAOS_CONFIG_FILE
uploadKeeper.enableTAOS_ADAPTER_UPLOAD_KEEPER_ENABLE
uploadKeeper.intervalTAOS_ADAPTER_UPLOAD_KEEPER_INTERVAL
uploadKeeper.retryIntervalTAOS_ADAPTER_UPLOAD_KEEPER_RETRY_INTERVAL
uploadKeeper.retryTimesTAOS_ADAPTER_UPLOAD_KEEPER_RETRY_TIMES
uploadKeeper.timeoutTAOS_ADAPTER_UPLOAD_KEEPER_TIMEOUT
uploadKeeper.urlTAOS_ADAPTER_UPLOAD_KEEPER_URL

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.

IPv6 Support

Starting from version 3.3.7.0, 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.

Monitoring Metrics

Currently, taosAdapter only collects monitoring indicators for RESTful/WebSocket related requests. There are no monitoring indicators for other interfaces.

taosAdapter reports monitoring indicators to taosKeeper, which will be written to the monitoring database by taosKeeper. The default is the log database, which can be modified in the taoskeeper configuration file. The following is a detailed introduction to these monitoring indicators.

The adapter_requests table records taosAdapter monitoring data:

Details
fieldtypeis_tagcomment
tsTIMESTAMPdata collection timestamp
totalINT UNSIGNEDtotal number of requests
queryINT UNSIGNEDnumber of query requests
writeINT UNSIGNEDnumber of write requests
otherINT UNSIGNEDnumber of other requests
in_processINT UNSIGNEDnumber of requests in process
successINT UNSIGNEDnumber of successful requests
failINT UNSIGNEDnumber of failed requests
query_successINT UNSIGNEDnumber of successful query requests
query_failINT UNSIGNEDnumber of failed query requests
write_successINT UNSIGNEDnumber of successful write requests
write_failINT UNSIGNEDnumber of failed write requests
other_successINT UNSIGNEDnumber of successful other requests
other_failINT UNSIGNEDnumber of failed other requests
query_in_processINT UNSIGNEDnumber of query requests in process
write_in_processINT UNSIGNEDnumber of write requests in process
endpointVARCHARrequest endpoint
req_typeNCHARtagrequest type: 0 for REST, 1 for WebSocket

The adapter_status table records the status data of taosAdapter:

Details
fieldtypeis_tagcomment
_tsTIMESTAMPdata collection timestamp
go_heap_sysDOUBLEheap memory allocated by Go runtime (bytes)
go_heap_inuseDOUBLEheap memory in use by Go runtime (bytes)
go_stack_sysDOUBLEstack memory allocated by Go runtime (bytes)
go_stack_inuseDOUBLEstack memory in use by Go runtime (bytes)
rssDOUBLEactual physical memory occupied by the process (bytes)
ws_query_connDOUBLEcurrent WebSocket connections for /rest/ws endpoint
ws_stmt_connDOUBLEcurrent WebSocket connections for /rest/stmt endpoint
ws_sml_connDOUBLEcurrent WebSocket connections for /rest/schemaless endpoint
ws_ws_connDOUBLEcurrent WebSocket connections for /ws endpoint
ws_tmq_connDOUBLEcurrent WebSocket connections for /rest/tmq endpoint
async_c_limitDOUBLEtotal concurrency limit for the C asynchronous interface
async_c_inflightDOUBLEcurrent concurrency for the C asynchronous interface
sync_c_limitDOUBLEtotal concurrency limit for the C synchronous interface
sync_c_inflightDOUBLEcurrent concurrency for the C synchronous interface
ws_query_conn_incDOUBLENew connections on /rest/ws interface (Available since v3.3.6.10)
ws_query_conn_decDOUBLEClosed connections on /rest/ws interface (Available since v3.3.6.10)
ws_stmt_conn_incDOUBLENew connections on /rest/stmt interface (Available since v3.3.6.10)
ws_stmt_conn_decDOUBLEClosed connections on /rest/stmt interface (Available since v3.3.6.10)
ws_sml_conn_incDOUBLENew connections on /rest/schemaless interface (Available since v3.3.6.10)
ws_sml_conn_decDOUBLEClosed connections on /rest/schemaless interface (Available since v3.3.6.10)
ws_ws_conn_incDOUBLENew connections on /ws interface (Available since v3.3.6.10)
ws_ws_conn_decDOUBLEClosed connections on /ws interface (Available since v3.3.6.10)
ws_tmq_conn_incDOUBLENew connections on /rest/tmq interface (Available since v3.3.6.10)
ws_tmq_conn_decDOUBLEClosed connections on /rest/tmq interface (Available since v3.3.6.10)
ws_query_sql_result_countDOUBLECurrent SQL query results held by /rest/ws interface (Available since v3.3.6.10)
ws_stmt_stmt_countDOUBLECurrent stmt objects held by /rest/stmt interface (Available since v3.3.6.10)
ws_ws_sql_result_countDOUBLECurrent SQL query results held by /ws interface (Available since v3.3.6.10)
ws_ws_stmt_countDOUBLECurrent stmt objects held by /ws interface (Available since v3.3.6.10)
ws_ws_stmt2_countDOUBLECurrent stmt2 objects held by /ws interface (Available since v3.3.6.10)
endpointNCHARTAGrequest endpoint

The adapter_conn_pool table records the connection pool monitoring data of taosAdapter:

Details
fieldtypeis_tagcomment
_tsTIMESTAMPdata collection timestamp
conn_pool_totalDOUBLEmaximum connection limit for the connection pool
conn_pool_in_useDOUBLEcurrent number of connections in use in the connection pool
endpointNCHARTAGrequest endpoint
userNCHARTAGusername to which the connection pool belongs

Starting from version 3.3.6.10, the adapter_c_interface table has been added to record taosAdapter C interface call metrics:

Details
fieldtypeis_tagcomment
_tsTIMESTAMPData collection timestamp
taos_connect_totalDOUBLECount of total connection attempts
taos_connect_successDOUBLECount of successful connections
taos_connect_failDOUBLECount of failed connections
taos_close_totalDOUBLECount of total close attempts
taos_close_successDOUBLECount of successful closes
taos_schemaless_insert_totalDOUBLECount of schemaless insert operations
taos_schemaless_insert_successDOUBLECount of successful schemaless inserts
taos_schemaless_insert_failDOUBLECount of failed schemaless inserts
taos_schemaless_free_result_totalDOUBLECount of schemaless result set releases
taos_schemaless_free_result_successDOUBLECount of successful schemaless result set releases
taos_query_totalDOUBLECount of synchronous SQL executions
taos_query_successDOUBLECount of successful synchronous SQL executions
taos_query_failDOUBLECount of failed synchronous SQL executions
taos_query_free_result_totalDOUBLECount of synchronous SQL result set releases
taos_query_free_result_successDOUBLECount of successful synchronous SQL result set releases
taos_query_a_with_reqid_totalDOUBLECount of async SQL with request ID
taos_query_a_with_reqid_successDOUBLECount of successful async SQL with request ID
taos_query_a_with_reqid_callback_totalDOUBLECount of async SQL callbacks with request ID
taos_query_a_with_reqid_callback_successDOUBLECount of successful async SQL callbacks with request ID
taos_query_a_with_reqid_callback_failDOUBLECount of failed async SQL callbacks with request ID
taos_query_a_free_result_totalDOUBLECount of async SQL result set releases
taos_query_a_free_result_successDOUBLECount of successful async SQL result set releases
tmq_consumer_poll_result_totalDOUBLECount of consumer polls with data
tmq_free_result_totalDOUBLECount of TMQ data releases
tmq_free_result_successDOUBLECount of successful TMQ data releases
taos_stmt2_init_totalDOUBLECount of stmt2 initializations
taos_stmt2_init_successDOUBLECount of successful stmt2 initializations
taos_stmt2_init_failDOUBLECount of failed stmt2 initializations
taos_stmt2_close_totalDOUBLECount of stmt2 closes
taos_stmt2_close_successDOUBLECount of successful stmt2 closes
taos_stmt2_close_failDOUBLECount of failed stmt2 closes
taos_stmt2_get_fields_totalDOUBLECount of stmt2 field fetches
taos_stmt2_get_fields_successDOUBLECount of successful stmt2 field fetches
taos_stmt2_get_fields_failDOUBLECount of failed stmt2 field fetches
taos_stmt2_free_fields_totalDOUBLECount of stmt2 field releases
taos_stmt2_free_fields_successDOUBLECount of successful stmt2 field releases
taos_stmt_init_with_reqid_totalDOUBLECount of stmt initializations with request ID
taos_stmt_init_with_reqid_successDOUBLECount of successful stmt initializations with request ID
taos_stmt_init_with_reqid_failDOUBLECount of failed stmt initializations with request ID
taos_stmt_close_totalDOUBLECount of stmt closes
taos_stmt_close_successDOUBLECount of successful stmt closes
taos_stmt_close_failDOUBLECount of failed stmt closes
taos_stmt_get_tag_fields_totalDOUBLECount of stmt tag field fetches
taos_stmt_get_tag_fields_successDOUBLECount of successful stmt tag field fetches
taos_stmt_get_tag_fields_failDOUBLECount of failed stmt tag field fetches
taos_stmt_get_col_fields_totalDOUBLECount of stmt column field fetches
taos_stmt_get_col_fields_successDOUBLECount of successful stmt column field fetches
taos_stmt_get_col_fields_failDOUBLECount of failed stmt column field fetches
taos_stmt_reclaim_fields_totalDOUBLECount of stmt field releases
taos_stmt_reclaim_fields_successDOUBLECount of successful stmt field releases
tmq_get_json_meta_totalDOUBLECount of TMQ JSON metadata fetches
tmq_get_json_meta_successDOUBLECount of successful TMQ JSON metadata fetches
tmq_free_json_meta_totalDOUBLECount of TMQ JSON metadata releases
tmq_free_json_meta_successDOUBLECount of successful TMQ JSON metadata releases
taos_fetch_whitelist_a_totalDOUBLECount of async whitelist fetches
taos_fetch_whitelist_a_successDOUBLECount of successful async whitelist fetches
taos_fetch_whitelist_a_callback_totalDOUBLECount of async whitelist callbacks
taos_fetch_whitelist_a_callback_successDOUBLECount of successful async whitelist callbacks
taos_fetch_whitelist_a_callback_failDOUBLECount of failed async whitelist callbacks
taos_fetch_rows_a_totalDOUBLECount of async row fetches
taos_fetch_rows_a_successDOUBLECount of successful async row fetches
taos_fetch_rows_a_callback_totalDOUBLECount of async row callbacks
taos_fetch_rows_a_callback_successDOUBLECount of successful async row callbacks
taos_fetch_rows_a_callback_failDOUBLECount of failed async row callbacks
taos_fetch_raw_block_a_totalDOUBLECount of async raw block fetches
taos_fetch_raw_block_a_successDOUBLECount of successful async raw block fetches
taos_fetch_raw_block_a_callback_totalDOUBLECount of async raw block callbacks
taos_fetch_raw_block_a_callback_successDOUBLECount of successful async raw block callbacks
taos_fetch_raw_block_a_callback_failDOUBLECount of failed async raw block callbacks
tmq_get_raw_totalDOUBLECount of raw data fetches
tmq_get_raw_successDOUBLECount of successful raw data fetches
tmq_get_raw_failDOUBLECount of failed raw data fetches
tmq_free_raw_totalDOUBLECount of raw data releases
tmq_free_raw_successDOUBLECount of successful raw data releases
tmq_consumer_new_totalDOUBLECount of new consumer creations
tmq_consumer_new_successDOUBLECount of successful new consumer creations
tmq_consumer_new_failDOUBLECount of failed new consumer creations
tmq_consumer_close_totalDOUBLECount of consumer closes
tmq_consumer_close_successDOUBLECount of successful consumer closes
tmq_consumer_close_failDOUBLECount of failed consumer closes
tmq_subscribe_totalDOUBLECount of topic subscriptions
tmq_subscribe_successDOUBLECount of successful topic subscriptions
tmq_subscribe_failDOUBLECount of failed topic subscriptions
tmq_unsubscribe_totalDOUBLECount of unsubscriptions
tmq_unsubscribe_successDOUBLECount of successful unsubscriptions
tmq_unsubscribe_failDOUBLECount of failed unsubscriptions
tmq_list_new_totalDOUBLECount of new topic list creations
tmq_list_new_successDOUBLECount of successful new topic list creations
tmq_list_new_failDOUBLECount of failed new topic list creations
tmq_list_destroy_totalDOUBLECount of topic list destructions
tmq_list_destroy_successDOUBLECount of successful topic list destructions
tmq_conf_new_totalDOUBLECount of TMQ new config creations
tmq_conf_new_successDOUBLECount of successful TMQ new config creations
tmq_conf_new_failDOUBLECount of failed TMQ new config creations
tmq_conf_destroy_totalDOUBLECount of TMQ config destructions
tmq_conf_destroy_successDOUBLECount of successful TMQ config destructions
taos_stmt2_prepare_totalDOUBLECount of stmt2 prepares
taos_stmt2_prepare_successDOUBLECount of successful stmt2 prepares
taos_stmt2_prepare_failDOUBLECount of failed stmt2 prepares
taos_stmt2_is_insert_totalDOUBLECount of insert checks
taos_stmt2_is_insert_successDOUBLECount of successful insert checks
taos_stmt2_is_insert_failDOUBLECount of failed insert checks
taos_stmt2_bind_param_totalDOUBLECount of stmt2 parameter bindings
taos_stmt2_bind_param_successDOUBLECount of successful stmt2 parameter bindings
taos_stmt2_bind_param_failDOUBLECount of failed stmt2 parameter bindings
taos_stmt2_exec_totalDOUBLECount of stmt2 executions
taos_stmt2_exec_successDOUBLECount of successful stmt2 executions
taos_stmt2_exec_failDOUBLECount of failed stmt2 executions
taos_stmt2_error_totalDOUBLECount of stmt2 error checks
taos_stmt2_error_successDOUBLECount of successful stmt2 error checks
taos_fetch_row_totalDOUBLECount of sync row fetches
taos_fetch_row_successDOUBLECount of successful sync row fetches
taos_is_update_query_totalDOUBLECount of update statement checks
taos_is_update_query_successDOUBLECount of successful update statement checks
taos_affected_rows_totalDOUBLECount of SQL affected rows fetches
taos_affected_rows_successDOUBLECount of successful SQL affected rows fetches
taos_num_fields_totalDOUBLECount of field count fetches
taos_num_fields_successDOUBLECount of successful field count fetches
taos_fetch_fields_e_totalDOUBLECount of extended field info fetches
taos_fetch_fields_e_successDOUBLECount of successful extended field info fetches
taos_fetch_fields_e_failDOUBLECount of failed extended field info fetches
taos_result_precision_totalDOUBLECount of precision fetches
taos_result_precision_successDOUBLECount of successful precision fetches
taos_get_raw_block_totalDOUBLECount of raw block fetches
taos_get_raw_block_successDOUBLECount of successful raw block fetches
taos_fetch_raw_block_totalDOUBLECount of raw block pulls
taos_fetch_raw_block_successDOUBLECount of successful raw block pulls
taos_fetch_raw_block_failDOUBLECount of failed raw block pulls
taos_fetch_lengths_totalDOUBLECount of field length fetches
taos_fetch_lengths_successDOUBLECount of successful field length fetches
taos_write_raw_block_with_reqid_totalDOUBLECount of request ID raw block writes
taos_write_raw_block_with_reqid_successDOUBLECount of successful request ID raw block writes
taos_write_raw_block_with_reqid_failDOUBLECount of failed request ID raw block writes
taos_write_raw_block_with_fields_with_reqid_totalDOUBLECount of request ID field raw block writes
taos_write_raw_block_with_fields_with_reqid_successDOUBLECount of successful request ID field raw block writes
taos_write_raw_block_with_fields_with_reqid_failDOUBLECount of failed request ID field raw block writes
tmq_write_raw_totalDOUBLECount of TMQ raw data writes
tmq_write_raw_successDOUBLECount of successful TMQ raw data writes
tmq_write_raw_failDOUBLECount of failed TMQ raw data writes
taos_stmt_prepare_totalDOUBLECount of stmt prepares
taos_stmt_prepare_successDOUBLECount of successful stmt prepares
taos_stmt_prepare_failDOUBLECount of failed stmt prepares
taos_stmt_is_insert_totalDOUBLECount of stmt insert checks
taos_stmt_is_insert_successDOUBLECount of successful stmt insert checks
taos_stmt_is_insert_failDOUBLECount of failed stmt insert checks
taos_stmt_set_tbname_totalDOUBLECount of stmt table name sets
taos_stmt_set_tbname_successDOUBLECount of successful stmt table name sets
taos_stmt_set_tbname_failDOUBLECount of failed stmt table name sets
taos_stmt_set_tags_totalDOUBLECount of stmt tag sets
taos_stmt_set_tags_successDOUBLECount of successful stmt tag sets
taos_stmt_set_tags_failDOUBLECount of failed stmt tag sets
taos_stmt_bind_param_batch_totalDOUBLECount of stmt batch parameter bindings
taos_stmt_bind_param_batch_successDOUBLECount of successful stmt batch parameter bindings
taos_stmt_bind_param_batch_failDOUBLECount of failed stmt batch parameter bindings
taos_stmt_add_batch_totalDOUBLECount of stmt batch additions
taos_stmt_add_batch_successDOUBLECount of successful stmt batch additions
taos_stmt_add_batch_failDOUBLECount of failed stmt batch additions
taos_stmt_execute_totalDOUBLECount of stmt executions
taos_stmt_execute_successDOUBLECount of successful stmt executions
taos_stmt_execute_failDOUBLECount of failed stmt executions
taos_stmt_num_params_totalDOUBLECount of stmt parameter count fetches
taos_stmt_num_params_successDOUBLECount of successful stmt parameter count fetches
taos_stmt_num_params_failDOUBLECount of failed stmt parameter count fetches
taos_stmt_get_param_totalDOUBLECount of stmt parameter fetches
taos_stmt_get_param_successDOUBLECount of successful stmt parameter fetches
taos_stmt_get_param_failDOUBLECount of failed stmt parameter fetches
taos_stmt_errstr_totalDOUBLECount of stmt error info fetches
taos_stmt_errstr_successDOUBLECount of successful stmt error info fetches
taos_stmt_affected_rows_once_totalDOUBLECount of stmt affected rows fetches
taos_stmt_affected_rows_once_successDOUBLECount of successful stmt affected rows fetches
taos_stmt_use_result_totalDOUBLECount of stmt result set uses
taos_stmt_use_result_successDOUBLECount of successful stmt result set uses
taos_stmt_use_result_failDOUBLECount of failed stmt result set uses
taos_select_db_totalDOUBLECount of database selections
taos_select_db_successDOUBLECount of successful database selections
taos_select_db_failDOUBLECount of failed database selections
taos_get_tables_vgId_totalDOUBLECount of table vgroup ID fetches
taos_get_tables_vgId_successDOUBLECount of successful table vgroup ID fetches
taos_get_tables_vgId_failDOUBLECount of failed table vgroup ID fetches
taos_options_connection_totalDOUBLECount of connection option sets
taos_options_connection_successDOUBLECount of successful connection option sets
taos_options_connection_failDOUBLECount of failed connection option sets
taos_validate_sql_totalDOUBLECount of SQL validations
taos_validate_sql_successDOUBLECount of successful SQL validations
taos_validate_sql_failDOUBLECount of failed SQL validations
taos_check_server_status_totalDOUBLECount of server status checks
taos_check_server_status_successDOUBLECount of successful server status checks
taos_get_current_db_totalDOUBLECount of current database fetches
taos_get_current_db_successDOUBLECount of successful current database fetches
taos_get_current_db_failDOUBLECount of failed current database fetches
taos_get_server_info_totalDOUBLECount of server info fetches
taos_get_server_info_successDOUBLECount of successful server info fetches
taos_options_totalDOUBLECount of option sets
taos_options_successDOUBLECount of successful option sets
taos_options_failDOUBLECount of failed option sets
taos_set_conn_mode_totalDOUBLECount of connection mode sets
taos_set_conn_mode_successDOUBLECount of successful connection mode sets
taos_set_conn_mode_failDOUBLECount of failed connection mode sets
taos_reset_current_db_totalDOUBLECount of current database resets
taos_reset_current_db_successDOUBLECount of successful current database resets
taos_set_notify_cb_totalDOUBLECount of notification callback sets
taos_set_notify_cb_successDOUBLECount of successful notification callback sets
taos_set_notify_cb_failDOUBLECount of failed notification callback sets
taos_errno_totalDOUBLECount of error code fetches
taos_errno_successDOUBLECount of successful error code fetches
taos_errstr_totalDOUBLECount of error message fetches
taos_errstr_successDOUBLECount of successful error message fetches
tmq_consumer_poll_totalDOUBLECount of TMQ consumer polls
tmq_consumer_poll_successDOUBLECount of successful TMQ consumer polls
tmq_consumer_poll_failDOUBLECount of failed TMQ consumer polls
tmq_subscription_totalDOUBLECount of TMQ subscription info fetches
tmq_subscription_successDOUBLECount of successful TMQ subscription info fetches
tmq_subscription_failDOUBLECount of failed TMQ subscription info fetches
tmq_list_append_totalDOUBLECount of TMQ list appends
tmq_list_append_successDOUBLECount of successful TMQ list appends
tmq_list_append_failDOUBLECount of failed TMQ list appends
tmq_list_get_size_totalDOUBLECount of TMQ list size fetches
tmq_list_get_size_successDOUBLECount of successful TMQ list size fetches
tmq_err2str_totalDOUBLECount of TMQ error code to string conversions
tmq_err2str_successDOUBLECount of successful TMQ error code to string conversions
tmq_conf_set_totalDOUBLECount of TMQ config sets
tmq_conf_set_successDOUBLECount of successful TMQ config sets
tmq_conf_set_failDOUBLECount of failed TMQ config sets
tmq_get_res_type_totalDOUBLECount of TMQ resource type fetches
tmq_get_res_type_successDOUBLECount of successful TMQ resource type fetches
tmq_get_topic_name_totalDOUBLECount of TMQ topic name fetches
tmq_get_topic_name_successDOUBLECount of successful TMQ topic name fetches
tmq_get_vgroup_id_totalDOUBLECount of TMQ vgroup ID fetches
tmq_get_vgroup_id_successDOUBLECount of successful TMQ vgroup ID fetches
tmq_get_vgroup_offset_totalDOUBLECount of TMQ vgroup offset fetches
tmq_get_vgroup_offset_successDOUBLECount of successful TMQ vgroup offset fetches
tmq_get_db_name_totalDOUBLECount of TMQ database name fetches
tmq_get_db_name_successDOUBLECount of successful TMQ database name fetches
tmq_get_table_name_totalDOUBLECount of TMQ table name fetches
tmq_get_table_name_successDOUBLECount of successful TMQ table name fetches
tmq_get_connect_totalDOUBLECount of TMQ connection fetches
tmq_get_connect_successDOUBLECount of successful TMQ connection fetches
tmq_commit_sync_totalDOUBLECount of TMQ sync commits
tmq_commit_sync_successDOUBLECount of successful TMQ sync commits
tmq_commit_sync_failDOUBLECount of failed TMQ sync commits
tmq_fetch_raw_block_totalDOUBLECount of TMQ raw block fetches
tmq_fetch_raw_block_successDOUBLECount of successful TMQ raw block fetches
tmq_fetch_raw_block_failDOUBLECount of failed TMQ raw block fetches
tmq_get_topic_assignment_totalDOUBLECount of TMQ topic assignment fetches
tmq_get_topic_assignment_successDOUBLECount of successful TMQ topic assignment fetches
tmq_get_topic_assignment_failDOUBLECount of failed TMQ topic assignment fetches
tmq_offset_seek_totalDOUBLECount of TMQ offset seeks
tmq_offset_seek_successDOUBLECount of successful TMQ offset seeks
tmq_offset_seek_failDOUBLECount of failed TMQ offset seeks
tmq_committed_totalDOUBLECount of TMQ committed offset fetches
tmq_committed_successDOUBLECount of successful TMQ committed offset fetches
tmq_commit_offset_sync_failDOUBLECount of failed TMQ sync offset commits
tmq_position_totalDOUBLECount of TMQ current position fetches
tmq_position_successDOUBLECount of successful TMQ current position fetches
tmq_commit_offset_sync_totalDOUBLECount of TMQ sync offset commits
tmq_commit_offset_sync_successDOUBLECount of successful TMQ sync offset commits
endpointNCHARTAGRequest endpoint

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