Merge branch '3.0' into fix/TD-21457-3.0

This commit is contained in:
kailixu 2023-05-23 09:27:31 +08:00
commit a171c0c860
11 changed files with 651 additions and 584 deletions

View File

@ -36,7 +36,7 @@ You can use below command to setup Grafana alert notification.
An existing Grafana Notification Channel can be specified with parameter `-E`, the notifier uid of the channel can be obtained by `curl -u admin:admin localhost:3000/api/alert-notifications |jq` An existing Grafana Notification Channel can be specified with parameter `-E`, the notifier uid of the channel can be obtained by `curl -u admin:admin localhost:3000/api/alert-notifications |jq`
```bash ```bash
sudo ./TDinsight.sh -a http://localhost:6041 -u root -p taosdata -E <notifier uid> ./TDinsight.sh -a http://localhost:6041 -u root -p taosdata -E <notifier uid>
``` ```
Launch `TDinsight.sh` with the command above and restart Grafana, then open Dashboard `http://localhost:3000/d/tdinsight`. Launch `TDinsight.sh` with the command above and restart Grafana, then open Dashboard `http://localhost:3000/d/tdinsight`.
@ -274,7 +274,7 @@ The data of tdinsight dashboard is stored in `log` database (default. You can ch
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||metric value| |gauge|DOUBLE||metric value|
|client\_ip|NCHAR|TAG|client ip| |client\_ip|NCHAR|TAG|client ip|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
|request\_method|NCHAR|TAG|request method| |request\_method|NCHAR|TAG|request method|
@ -288,7 +288,7 @@ The data of tdinsight dashboard is stored in `log` database (default. You can ch
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||metric value| |gauge|DOUBLE||metric value|
|client\_ip|NCHAR|TAG|client ip| |client\_ip|NCHAR|TAG|client ip|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
|request\_method|NCHAR|TAG|request method| |request\_method|NCHAR|TAG|request method|
@ -302,7 +302,7 @@ The data of tdinsight dashboard is stored in `log` database (default. You can ch
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||metric value| |gauge|DOUBLE||metric value|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
### taosadapter\_restful\_http\_request\_summary\_milliseconds table ### taosadapter\_restful\_http\_request\_summary\_milliseconds table
@ -330,7 +330,7 @@ The data of tdinsight dashboard is stored in `log` database (default. You can ch
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||metric value| |gauge|DOUBLE||metric value|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
### taosadapter\_system\_cpu\_percent table ### taosadapter\_system\_cpu\_percent table
@ -340,6 +340,6 @@ The data of tdinsight dashboard is stored in `log` database (default. You can ch
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||mertic value| |gauge|DOUBLE||mertic value|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|

View File

@ -149,7 +149,7 @@ curl --no-progress-meter -u admin:admin http://localhost:3000/api/alert-notifica
Use the `uid` value obtained above as `-E` input. Use the `uid` value obtained above as `-E` input.
```bash ```bash
sudo ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier
``` ```
If you want to monitor multiple TDengine clusters, you need to set up numerous TDinsight dashboards. Setting up non-default TDinsight requires some changes: the `-n` `-i` `-t` options need to be changed to non-default names, and `-N` and `-L` should also be changed if using the built-in SMS alerting feature. If you want to monitor multiple TDengine clusters, you need to set up numerous TDinsight dashboards. Setting up non-default TDinsight requires some changes: the `-n` `-i` `-t` options need to be changed to non-default names, and `-N` and `-L` should also be changed if using the built-in SMS alerting feature.

View File

@ -46,7 +46,7 @@ The parameters described in this document by the effect that they have on the sy
### firstEp ### firstEp
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------------------------- | | ---------- | ---------------------------------------------------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | The end point of the first dnode in the cluster to be connected to when `taosd` or `taos` is started | | Meaning | The end point of the first dnode in the cluster to be connected to when `taosd` or `taos` is started |
| Default | localhost:6030 | | Default | localhost:6030 |
@ -54,7 +54,7 @@ The parameters described in this document by the effect that they have on the sy
### secondEp ### secondEp
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------------------------------------------- | | ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | The end point of the second dnode to be connected to if the firstEp is not available when `taosd` or `taos` is started | | Meaning | The end point of the second dnode to be connected to if the firstEp is not available when `taosd` or `taos` is started |
| Default | None | | Default | None |
@ -71,7 +71,7 @@ The parameters described in this document by the effect that they have on the sy
### serverPort ### serverPort
| Attribute | Description | | Attribute | Description |
| -------- | ----------------------------------------------------------------------------------------------------------------------- | | ------------- | ----------------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | The port for external access after `taosd` is started | | Meaning | The port for external access after `taosd` is started |
| Default Value | 6030 | | Default Value | 6030 |
@ -80,12 +80,12 @@ The parameters described in this document by the effect that they have on the sy
- Ensure that your firewall rules do not block TCP port 6042 on any host in the cluster. Below table describes the ports used by TDengine in details. - Ensure that your firewall rules do not block TCP port 6042 on any host in the cluster. Below table describes the ports used by TDengine in details.
::: :::
| Protocol | Default Port | Description | How to configure | | Protocol | Default Port | Description | How to configure |
| :------- | :----------- | :----------------------------------------------- | :--------------------------------------------------------------------------------------------- | | :------- | :----------- | :-------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
| TCP | 6030 | Communication between client and server. In a multi-node cluster, communication between nodes. serverPort | | TCP | 6030 | Communication between client and server. In a multi-node cluster, communication between nodes. serverPort |
| TCP | 6041 | REST connection between client and server | Prior to 2.4.0.0: serverPort+11; After 2.4.0.0 refer to [taosAdapter](/reference/taosadapter/) | | TCP | 6041 | REST connection between client and server | Prior to 2.4.0.0: serverPort+11; After 2.4.0.0 refer to [taosAdapter](/reference/taosadapter/) |
| TCP | 6043 | Service Port of taosKeeper | The parameter of taosKeeper | | TCP | 6043 | Service Port of taosKeeper | The parameter of taosKeeper |
| TCP | 6044 | Data access port for StatsD | Configurable through taosAdapter parameters. | TCP | 6044 | Data access port for StatsD | Configurable through taosAdapter parameters. |
| UDP | 6045 | Data access for statsd | Configurable through taosAdapter parameters. | UDP | 6045 | Data access for statsd | Configurable through taosAdapter parameters. |
| TCP | 6060 | Port of Monitoring Service in Enterprise version | | | TCP | 6060 | Port of Monitoring Service in Enterprise version | |
### maxShellConns ### maxShellConns
@ -97,6 +97,24 @@ The parameters described in this document by the effect that they have on the sy
| Value Range | 10-50000000 | | Value Range | 10-50000000 |
| Default Value | 5000 | | Default Value | 5000 |
### numOfRpcSessions
| Attribute | Description |
| ------------- | ------------------------------------------ |
| Applicable | Client/Server |
| Meaning | The maximum number of connection to create |
| Value Range | 100-100000 |
| Default Value | 10000 |
### timeToGetAvailableConn
| Attribute | Description |
| ------------- | ---------------------------------------------- |
| Applicable | Client/Server |
| Meaning | The maximum waiting time to get avaliable conn |
| Value Range | 10-50000000(ms) |
| Default Value | 500000 |
## Monitoring Parameters ## Monitoring Parameters
:::note :::note
@ -105,16 +123,16 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### monitor ### monitor
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Server only | | Applicable | Server only |
| Meaning | The switch for monitoring inside server. The main object of monitoring is to collect information about load on physical nodes, including CPU usage, memory usage, disk usage, and network bandwidth. Monitoring information is sent over HTTP to the taosKeeper service specified by `monitorFqdn` and `monitorProt`. | Meaning | The switch for monitoring inside server. The main object of monitoring is to collect information about load on physical nodes, including CPU usage, memory usage, disk usage, and network bandwidth. Monitoring information is sent over HTTP to the taosKeeper service specified by `monitorFqdn` and `monitorProt`. |
| Value Range | 0: monitoring disabled, 1: monitoring enabled | | Value Range | 0: monitoring disabled, 1: monitoring enabled |
| Default | 0 | | Default | 0 |
### monitorFqdn ### monitorFqdn
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------- | | ---------- | ------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | FQDN of taosKeeper monitoring service | | Meaning | FQDN of taosKeeper monitoring service |
| Default | None | | Default | None |
@ -122,7 +140,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### monitorPort ### monitorPort
| Attribute | Description | | Attribute | Description |
| -------- | --------------------------- | | ------------- | ------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Port of taosKeeper monitoring service | | Meaning | Port of taosKeeper monitoring service |
| Default Value | 6043 | | Default Value | 6043 |
@ -130,7 +148,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### monitorInterval ### monitorInterval
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------- | | ------------- | ------------------------------------------ |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | The interval of collecting system workload | | Meaning | The interval of collecting system workload |
| Unit | second | | Unit | second |
@ -140,7 +158,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### telemetryReporting ### telemetryReporting
| Attribute | Description | | Attribute | Description |
| -------- | ---------------------------------------- | | ------------- | ---------------------------------------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Switch for allowing TDengine to collect and report service usage information | | Meaning | Switch for allowing TDengine to collect and report service usage information |
| Value Range | 0: Not allowed; 1: Allowed | | Value Range | 0: Not allowed; 1: Allowed |
@ -148,7 +166,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### crashReporting ### crashReporting
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------- | | ------------- | ---------------------------------------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Switch for allowing TDengine to collect and report crash related information | | Meaning | Switch for allowing TDengine to collect and report crash related information |
| Value Range | 0,1 0: Not allowed; 1: allowed | | Value Range | 0,1 0: Not allowed; 1: allowed |
@ -160,7 +178,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### queryPolicy ### queryPolicy
| Attribute | Description | | Attribute | Description |
| -------- | ----------------------------- | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Client only | | Applicable | Client only |
| Meaning | Execution policy for query statements | | Meaning | Execution policy for query statements |
| Unit | None | | Unit | None |
@ -170,7 +188,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### querySmaOptimize ### querySmaOptimize
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Client only | | Applicable | Client only |
| Meaning | SMA index optimization policy | | Meaning | SMA index optimization policy |
| Unit | None | | Unit | None |
@ -180,7 +198,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### countAlwaysReturnValue ### countAlwaysReturnValue
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------- | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Server only | | Applicable | Server only |
| Meaning | count()/hyperloglog() return value or not if the input data is empty or NULL | | Meaning | count()/hyperloglog() return value or not if the input data is empty or NULL |
| Vlue Range | 0: Return empty line, 1: Return 0 | | Vlue Range | 0: Return empty line, 1: Return 0 |
@ -190,7 +208,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### maxNumOfDistinctRes ### maxNumOfDistinctRes
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------- | | ------------- | -------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | The maximum number of distinct rows returned | | Meaning | The maximum number of distinct rows returned |
| Value Range | [100,000 - 100,000,000] | | Value Range | [100,000 - 100,000,000] |
@ -199,7 +217,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### keepColumnName ### keepColumnName
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------- | | ------------- | --------------------------------------------------------------------------------------------------------------- |
| Applicable | Client only | | Applicable | Client only |
| Meaning | When the Last, First, LastRow function is queried, whether the returned column name contains the function name. | | Meaning | When the Last, First, LastRow function is queried, whether the returned column name contains the function name. |
| Value Range | 0 means including the function name, 1 means not including the function name. | | Value Range | 0 means including the function name, 1 means not including the function name. |
@ -210,7 +228,7 @@ Please note the `taoskeeper` needs to be installed and running to create the `lo
### timezone ### timezone
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------ | | ------------- | ------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | TimeZone | | Meaning | TimeZone |
| Default Value | TimeZone configured in the host | | Default Value | TimeZone configured in the host |
@ -315,7 +333,7 @@ The charset that takes effect is UTF-8.
### dataDir ### dataDir
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------ | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | All data files are stored in this directory | | Meaning | All data files are stored in this directory |
| Default Value | /var/lib/taos | | Default Value | /var/lib/taos |
@ -324,7 +342,7 @@ The charset that takes effect is UTF-8.
### tempDir ### tempDir
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------ | | ---------- | ---------------------------------------------------------------------------------- |
| Applicable | Server only | | Applicable | Server only |
| Meaning | The directory where to put all the temporary files generated during system running | | Meaning | The directory where to put all the temporary files generated during system running |
| Default | /tmp | | Default | /tmp |
@ -332,7 +350,7 @@ The charset that takes effect is UTF-8.
### minimalTmpDirGB ### minimalTmpDirGB
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------ | | ------------- | ----------------------------------------------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | When the available disk space in tmpDir is below this threshold, writing to tmpDir is suspended | | Meaning | When the available disk space in tmpDir is below this threshold, writing to tmpDir is suspended |
| Unit | GB | | Unit | GB |
@ -341,7 +359,7 @@ The charset that takes effect is UTF-8.
### minimalDataDirGB ### minimalDataDirGB
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------ | | ------------- | ------------------------------------------------------------------------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | When the available disk space in dataDir is below this threshold, writing to dataDir is suspended | | Meaning | When the available disk space in dataDir is below this threshold, writing to dataDir is suspended |
| Unit | GB | | Unit | GB |
@ -352,7 +370,7 @@ The charset that takes effect is UTF-8.
### supportVnodes ### supportVnodes
| Attribute | Description | | Attribute | Description |
| -------- | --------------------------- | | ------------- | ---------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Maximum number of vnodes per dnode | | Meaning | Maximum number of vnodes per dnode |
| Value Range | 0-4096 | | Value Range | 0-4096 |
@ -374,7 +392,7 @@ The charset that takes effect is UTF-8.
### logDir ### logDir
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------------- | | ------------- | ----------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | The directory for writing log files | | Meaning | The directory for writing log files |
| Default Value | /var/log/taos | | Default Value | /var/log/taos |
@ -382,7 +400,7 @@ The charset that takes effect is UTF-8.
### minimalLogDirGB ### minimalLogDirGB
| Attribute | Description | | Attribute | Description |
| -------- | -------------------------------------------- | | ------------- | -------------------------------------------------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | When the available disk space in logDir is below this threshold, writing to log files is suspended | | Meaning | When the available disk space in logDir is below this threshold, writing to log files is suspended |
| Unit | GB | | Unit | GB |
@ -391,7 +409,7 @@ The charset that takes effect is UTF-8.
### numOfLogLines ### numOfLogLines
| Attribute | Description | | Attribute | Description |
| -------- | ---------------------------- | | ------------- | ------------------------------------------ |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Maximum number of lines in single log file | | Meaning | Maximum number of lines in single log file |
| Default Value | 10000000 | | Default Value | 10000000 |
@ -399,7 +417,7 @@ The charset that takes effect is UTF-8.
### asyncLog ### asyncLog
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ---------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | The mode of writing log file | | Meaning | The mode of writing log file |
| Value Range | 0: sync way; 1: async way | | Value Range | 0: sync way; 1: async way |
@ -408,7 +426,7 @@ The charset that takes effect is UTF-8.
### logKeepDays ### logKeepDays
| Attribute | Description | | Attribute | Description |
| -------- | ----------------------------------------------------------------------------------- | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | The number of days for log files to be kept | | Meaning | The number of days for log files to be kept |
| Unit | day | | Unit | day |
@ -418,7 +436,7 @@ The charset that takes effect is UTF-8.
### debugFlag ### debugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------------------------------------------------------- | | ------------- | --------------------------------------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level | | Meaning | Log level |
| Value Range | 131: INFO/WARNING/ERROR; 135: plus DEBUG; 143: plus TRACE | | Value Range | 131: INFO/WARNING/ERROR; 135: plus DEBUG; 143: plus TRACE |
@ -427,7 +445,7 @@ The charset that takes effect is UTF-8.
### tmrDebugFlag ### tmrDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level of timer module | | Meaning | Log level of timer module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -436,7 +454,7 @@ The charset that takes effect is UTF-8.
### uDebugFlag ### uDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ---------------------- | | ------------- | -------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level of common module | | Meaning | Log level of common module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -445,7 +463,7 @@ The charset that takes effect is UTF-8.
### rpcDebugFlag ### rpcDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ----------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level of rpc module | | Meaning | Log level of rpc module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -454,7 +472,7 @@ The charset that takes effect is UTF-8.
### jniDebugFlag ### jniDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ----------------------- |
| Applicable | Client Only | | Applicable | Client Only |
| Meaning | Log level of jni module | | Meaning | Log level of jni module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -463,7 +481,7 @@ The charset that takes effect is UTF-8.
### qDebugFlag ### qDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------- |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level of query module | | Meaning | Log level of query module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -472,7 +490,7 @@ The charset that takes effect is UTF-8.
### cDebugFlag ### cDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | --------------------- | | ------------- | ------------------- |
| Applicable | Client Only | | Applicable | Client Only |
| Meaning | Log level of Client | | Meaning | Log level of Client |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -481,7 +499,7 @@ The charset that takes effect is UTF-8.
### dDebugFlag ### dDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------ |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of dnode | | Meaning | Log level of dnode |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -490,7 +508,7 @@ The charset that takes effect is UTF-8.
### vDebugFlag ### vDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------ |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of vnode | | Meaning | Log level of vnode |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -499,7 +517,7 @@ The charset that takes effect is UTF-8.
### mDebugFlag ### mDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of mnode module | | Meaning | Log level of mnode module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -508,7 +526,7 @@ The charset that takes effect is UTF-8.
### wDebugFlag ### wDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ----------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of WAL module | | Meaning | Log level of WAL module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -517,7 +535,7 @@ The charset that takes effect is UTF-8.
### sDebugFlag ### sDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------ |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Log level of sync module | | Meaning | Log level of sync module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -526,7 +544,7 @@ The charset that takes effect is UTF-8.
### tsdbDebugFlag ### tsdbDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------- | | ------------- | ------------------------ |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of TSDB module | | Meaning | Log level of TSDB module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -535,7 +553,7 @@ The charset that takes effect is UTF-8.
### tqDebugFlag ### tqDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ----------------- | | ------------- | ---------------------- |
| Applicable | Server only | | Applicable | Server only |
| Meaning | Log level of TQ module | | Meaning | Log level of TQ module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -544,7 +562,7 @@ The charset that takes effect is UTF-8.
### fsDebugFlag ### fsDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ----------------- | | ------------- | ---------------------- |
| Applicable | Server only | | Applicable | Server only |
| Meaning | Log level of FS module | | Meaning | Log level of FS module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -553,7 +571,7 @@ The charset that takes effect is UTF-8.
### udfDebugFlag ### udfDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ----------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of UDF module | | Meaning | Log level of UDF module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -562,7 +580,7 @@ The charset that takes effect is UTF-8.
### smaDebugFlag ### smaDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ----------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of SMA module | | Meaning | Log level of SMA module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -571,7 +589,7 @@ The charset that takes effect is UTF-8.
### idxDebugFlag ### idxDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | -------------------- | | ------------- | ------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of index module | | Meaning | Log level of index module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -580,7 +598,7 @@ The charset that takes effect is UTF-8.
### tdbDebugFlag ### tdbDebugFlag
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ----------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Log level of TDB module | | Meaning | Log level of TDB module |
| Value Range | same as debugFlag | | Value Range | same as debugFlag |
@ -591,7 +609,7 @@ The charset that takes effect is UTF-8.
### smlChildTableName ### smlChildTableName
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------- | | ------------- | ------------------------------------------ |
| Applicable | Client only | | Applicable | Client only |
| Meaning | Custom subtable name for schemaless writes | | Meaning | Custom subtable name for schemaless writes |
| Type | String | | Type | String |
@ -600,7 +618,7 @@ The charset that takes effect is UTF-8.
### smlTagName ### smlTagName
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------ | | ------------- | ------------------------------------------------------------- |
| Applicable | Client only | | Applicable | Client only |
| Meaning | Default tag for schemaless writes without tag value specified | | Meaning | Default tag for schemaless writes without tag value specified |
| Type | String | | Type | String |
@ -609,7 +627,7 @@ The charset that takes effect is UTF-8.
### smlDataFormat ### smlDataFormat
| Attribute | Description | | Attribute | Description |
| -------- | ----------------------------- | | ----------- | ----------------------------------------------------------------------------------- |
| Applicable | Client only | | Applicable | Client only |
| Meaning | Whether schemaless columns are consistently ordered, depat, discarded since 3.0.3.0 | | Meaning | Whether schemaless columns are consistently ordered, depat, discarded since 3.0.3.0 |
| Value Range | 0: not consistent; 1: consistent. | | Value Range | 0: not consistent; 1: consistent. |
@ -620,7 +638,7 @@ The charset that takes effect is UTF-8.
### compressMsgSize ### compressMsgSize
| Attribute | Description | | Attribute | Description |
| -------- | ----------------------------- | | ----------- | ------------------------------------------------------------------------------------------------------------------ |
| Applicable | Both Client and Server side | | Applicable | Both Client and Server side |
| Meaning | Whether RPC message is compressed | | Meaning | Whether RPC message is compressed |
| Value Range | -1: none message is compressed; 0: all messages are compressed; N (N>0): messages exceeding N bytes are compressed | | Value Range | -1: none message is compressed; 0: all messages are compressed; N (N>0): messages exceeding N bytes are compressed |
@ -632,7 +650,7 @@ The charset that takes effect is UTF-8.
### enableCoreFile ### enableCoreFile
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Applicable | Server and Client | | Applicable | Server and Client |
| Meaning | Whether to generate core file when server crashes | | Meaning | Whether to generate core file when server crashes |
| Value Range | 0: false, 1: true | | Value Range | 0: false, 1: true |
@ -642,7 +660,7 @@ The charset that takes effect is UTF-8.
### enableScience ### enableScience
| Attribute | Description | | Attribute | Description |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | ------------- | ------------------------------------------------------------- |
| Applicable | Only taos-CLI client | | Applicable | Only taos-CLI client |
| Meaning | Whether to show float and double with the scientific notation | | Meaning | Whether to show float and double with the scientific notation |
| Value Range | 0: false, 1: true | | Value Range | 0: false, 1: true |
@ -652,7 +670,7 @@ The charset that takes effect is UTF-8.
### udf ### udf
| Attribute | Description | | Attribute | Description |
| -------- | ------------------ | | ------------- | ---------------------------------- |
| Applicable | Server Only | | Applicable | Server Only |
| Meaning | Whether the UDF service is enabled | | Meaning | Whether the UDF service is enabled |
| Value Range | 0: disable UDF; 1: enabled UDF | | Value Range | 0: disable UDF; 1: enabled UDF |
@ -662,7 +680,7 @@ The charset that takes effect is UTF-8.
## 3.0 Parameters ## 3.0 Parameters
| # | **Parameter** | **Applicable to 2.x ** | **Applicable to 3.0 ** | Current behavior in 3.0 | | # | **Parameter** | **Applicable to 2.x ** | **Applicable to 3.0 ** | Current behavior in 3.0 |
| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | | --- | :--------------------: | ---------------------- | ---------------------------- | ----------------------- |
| 1 | firstEp | Yes | Yes | | | 1 | firstEp | Yes | Yes | |
| 2 | secondEp | Yes | Yes | | | 2 | secondEp | Yes | Yes | |
| 3 | fqdn | Yes | Yes | | | 3 | fqdn | Yes | Yes | |

View File

@ -177,7 +177,7 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste
假设您在主机 `tdengine` 上启动 TDengine 数据库HTTP API 端口为 `6041`,用户为 `root1`,密码为 `pass5ord`。执行脚本: 假设您在主机 `tdengine` 上启动 TDengine 数据库HTTP API 端口为 `6041`,用户为 `root1`,密码为 `pass5ord`。执行脚本:
```bash ```bash
sudo ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord
``` ```
我们提供了一个“-E”选项用于从命令行配置 TDinsight 使用现有的通知通道(Notification Channel)。假设你的 Grafana 用户和密码是 `admin:admin`,使用以下命令获取已有的通知通道的`uid` 我们提供了一个“-E”选项用于从命令行配置 TDinsight 使用现有的通知通道(Notification Channel)。假设你的 Grafana 用户和密码是 `admin:admin`,使用以下命令获取已有的通知通道的`uid`
@ -189,7 +189,7 @@ curl --no-progress-meter -u admin:admin http://localhost:3000/api/alert-notifica
使用上面获取的 `uid` 值作为 `-E` 输入。 使用上面获取的 `uid` 值作为 `-E` 输入。
```bash ```bash
sudo ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier
``` ```
如果要监控多个 TDengine 集群,则需要设置多个 TDinsight 仪表盘。设置非默认 TDinsight 需要进行一些更改: `-n` `-i` `-t` 选项需要更改为非默认名称,如果使用 内置短信告警功能,`-N` 和 `-L` 也应该改变。 如果要监控多个 TDengine 集群,则需要设置多个 TDinsight 仪表盘。设置非默认 TDinsight 需要进行一些更改: `-n` `-i` `-t` 选项需要更改为非默认名称,如果使用 内置短信告警功能,`-N` 和 `-L` 也应该改变。

View File

@ -80,7 +80,7 @@ taos --dump-config
确保集群中所有主机在端口 6030 上的 TCP 协议能够互通。(详细的端口情况请参见下表) 确保集群中所有主机在端口 6030 上的 TCP 协议能够互通。(详细的端口情况请参见下表)
::: :::
| 协议 | 默认端口 | 用途说明 | 修改方法 | | 协议 | 默认端口 | 用途说明 | 修改方法 |
| :--- | :-------- | :---------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | | :--- | :------- | :----------------------------------------------- | :------------------------------------------------------------------------------------------------- |
| TCP | 6030 | 客户端与服务端之间通讯,多节点集群的节点间通讯。 | 由配置文件设置 serverPort 决定。 | | TCP | 6030 | 客户端与服务端之间通讯,多节点集群的节点间通讯。 | 由配置文件设置 serverPort 决定。 |
| TCP | 6041 | 客户端与服务端之间的 RESTful 通讯。 | 随 serverPort 端口变化。注意 taosAdapter 配置或有不同,请参考相应[文档](/reference/taosadapter/)。 | | TCP | 6041 | 客户端与服务端之间的 RESTful 通讯。 | 随 serverPort 端口变化。注意 taosAdapter 配置或有不同,请参考相应[文档](/reference/taosadapter/)。 |
| TCP | 6043 | taosKeeper 监控服务端口。 | 随 taosKeeper 启动参数设置变化。 | | TCP | 6043 | taosKeeper 监控服务端口。 | 随 taosKeeper 启动参数设置变化。 |
@ -97,6 +97,24 @@ taos --dump-config
| 取值范围 | 10-50000000 | | 取值范围 | 10-50000000 |
| 缺省值 | 5000 | | 缺省值 | 5000 |
### numOfRpcSessions
| 属性 | 说明 |
| -------- | ---------------------------- |
| 适用范围 | 客户端和服务端都适用 |
| 含义 | 一个客户端能创建的最大连接数 |
| 取值范围 | 100-100000 |
| 缺省值 | 10000 |
### timeToGetAvailableConn
| 属性 | 说明 |
| -------- | -------------------------- |
| 适用范围 | 客户端和服务端都适用 |
| 含义 | 获得可用连接的最长等待时间 |
| 取值范围 | 10-50000000(单位为毫秒) |
| 缺省值 | 500000 |
## 监控相关 ## 监控相关
:::note :::note
@ -140,7 +158,7 @@ taos --dump-config
### telemetryReporting ### telemetryReporting
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------------------------------- | | -------- | ------------------------ |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | 是否上传 telemetry | | 含义 | 是否上传 telemetry |
| 取值范围 | 0,1 0: 不上传1上传 | | 取值范围 | 0,1 0: 不上传1上传 |
@ -149,7 +167,7 @@ taos --dump-config
### crashReporting ### crashReporting
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------------------------------- | | -------- | ------------------------ |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | 是否上传 crash 信息 | | 含义 | 是否上传 crash 信息 |
| 取值范围 | 0,1 0: 不上传1上传 | | 取值范围 | 0,1 0: 不上传1上传 |
@ -160,7 +178,7 @@ taos --dump-config
### queryPolicy ### queryPolicy
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ----------------------------- | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 适用范围 | 仅客户端适用 | | 适用范围 | 仅客户端适用 |
| 含义 | 查询语句的执行策略 | | 含义 | 查询语句的执行策略 |
| 单位 | 无 | | 单位 | 无 |
@ -170,7 +188,7 @@ taos --dump-config
### querySmaOptimize ### querySmaOptimize
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------- | | -------- | ---------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅客户端适用 | | 适用范围 | 仅客户端适用 |
| 含义 | sma index 的优化策略 | | 含义 | sma index 的优化策略 |
| 单位 | 无 | | 单位 | 无 |
@ -189,7 +207,7 @@ taos --dump-config
### keepColumnName ### keepColumnName
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------------------- | | -------- | ----------------------------------------------------------- |
| 适用范围 | 仅客户端适用 | | 适用范围 | 仅客户端适用 |
| 含义 | Last、First、LastRow 函数查询时,返回的列名是否包含函数名。 | | 含义 | Last、First、LastRow 函数查询时,返回的列名是否包含函数名。 |
| 取值范围 | 0 表示包含函数名1 表示不包含函数名。 | | 取值范围 | 0 表示包含函数名1 表示不包含函数名。 |
@ -198,7 +216,7 @@ taos --dump-config
### countAlwaysReturnValue ### countAlwaysReturnValue
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------------------- | | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | count/hyperloglog函数在输入数据为空或者NULL的情况下是否返回值 | | 含义 | count/hyperloglog函数在输入数据为空或者NULL的情况下是否返回值 |
| 取值范围 | 0返回空行1返回 0 | | 取值范围 | 0返回空行1返回 0 |
@ -315,7 +333,7 @@ charset 的有效值是 UTF-8。
### dataDir ### dataDir
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ------------------------------------------ | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 含义 | 数据文件目录,所有的数据文件都将写入该目录 |
| 缺省值 | /var/lib/taos | | 缺省值 | /var/lib/taos |
@ -324,7 +342,7 @@ charset 的有效值是 UTF-8。
### tempDir ### tempDir
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ------------------------------------------ | | -------- | ------------------------------------------------ |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | 该参数指定所有系统运行过程中的临时文件生成的目录 | | 含义 | 该参数指定所有系统运行过程中的临时文件生成的目录 |
| 缺省值 | /tmp | | 缺省值 | /tmp |
@ -341,7 +359,7 @@ charset 的有效值是 UTF-8。
### minimalDataDirGB ### minimalDataDirGB
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ------------------------------------------------ | | -------- | ---------------------------------------------- |
| 适用范围 | 仅服务端适用 | | 适用范围 | 仅服务端适用 |
| 含义 | dataDir 指定的时序数据存储目录所需要保留的最小 | | 含义 | dataDir 指定的时序数据存储目录所需要保留的最小 |
| 单位 | GB | | 单位 | GB |
@ -382,7 +400,7 @@ charset 的有效值是 UTF-8。
### minimalLogDirGB ### minimalLogDirGB
| 属性 | 说明 | | 属性 | 说明 |
| -------- | -------------------------------------------- | | -------- | ------------------------------------------------------ |
| 适用范围 | 服务端和客户端均适用 | | 适用范围 | 服务端和客户端均适用 |
| 含义 | 当日志文件夹所在磁盘可用空间大小小于该值时,停止写日志 | | 含义 | 当日志文件夹所在磁盘可用空间大小小于该值时,停止写日志 |
| 单位 | GB | | 单位 | GB |
@ -591,7 +609,7 @@ charset 的有效值是 UTF-8。
### smlChildTableName ### smlChildTableName
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ------------------------- | | -------- | ------------------------------- |
| 适用范围 | 仅客户端适用 | | 适用范围 | 仅客户端适用 |
| 含义 | schemaless 自定义的子表名的 key | | 含义 | schemaless 自定义的子表名的 key |
| 类型 | 字符串 | | 类型 | 字符串 |
@ -609,7 +627,7 @@ charset 的有效值是 UTF-8。
### smlDataFormat ### smlDataFormat
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ----------------------------- | | -------- | -------------------------------------------------------- |
| 适用范围 | 仅客户端适用 | | 适用范围 | 仅客户端适用 |
| 含义 | schemaless 列数据是否顺序一致从3.0.3.0开始,该配置废弃 | | 含义 | schemaless 列数据是否顺序一致从3.0.3.0开始,该配置废弃 |
| 值域 | 0不一致1: 一致 | | 值域 | 0不一致1: 一致 |
@ -630,7 +648,7 @@ charset 的有效值是 UTF-8。
### enableScience ### enableScience
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | -------- | ---------------------------- |
| 适用范围 | 仅客户端 TAOS-CLI 适用 | | 适用范围 | 仅客户端 TAOS-CLI 适用 |
| 含义 | 是否开启科学计数法显示浮点数 | | 含义 | 是否开启科学计数法显示浮点数 |
| 取值范围 | 01是 | | 取值范围 | 01是 |
@ -650,7 +668,7 @@ charset 的有效值是 UTF-8。
### compressMsgSize ### compressMsgSize
| 属性 | 说明 | | 属性 | 说明 |
| -------- | ----------------------------- | | -------- | ------------------------------------------------------------------------------- |
| 适用于 | 服务端和客户端均适用 | | 适用于 | 服务端和客户端均适用 |
| 含义 | 是否对 RPC 消息进行压缩 | | 含义 | 是否对 RPC 消息进行压缩 |
| 取值范围 | -1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩 | | 取值范围 | -1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩 |
@ -659,7 +677,7 @@ charset 的有效值是 UTF-8。
## 3.0 中有效的配置参数列表 ## 3.0 中有效的配置参数列表
| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | | # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 |
| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | | --- | :--------------------: | --------------- | ------------------------------- | ------------------ |
| 1 | firstEp | 是 | 是 | | | 1 | firstEp | 是 | 是 | |
| 2 | secondEp | 是 | 是 | | | 2 | secondEp | 是 | 是 | |
| 3 | fqdn | 是 | 是 | | | 3 | fqdn | 是 | 是 | |
@ -716,7 +734,7 @@ charset 的有效值是 UTF-8。
## 2.x->3.0 的废弃参数 ## 2.x->3.0 的废弃参数
| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | | # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 |
| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | | --- | :---------------------: | --------------- | --------------- | ---------------------------------------------------- |
| 1 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 | | 1 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 |
| 2 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 | | 2 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 |
| 3 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode | | 3 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode |

View File

@ -32,7 +32,7 @@ chmod +x TDinsight.sh
- 使用已经存在的 Grafana Notification Channel `uid`,参数 `-E`。该参数可以使用 `curl -u admin:admin localhost:3000/api/alert-notifications |jq` 来获取。 - 使用已经存在的 Grafana Notification Channel `uid`,参数 `-E`。该参数可以使用 `curl -u admin:admin localhost:3000/api/alert-notifications |jq` 来获取。
```bash ```bash
sudo ./TDinsight.sh -a http://localhost:6041 -u root -p taosdata -E <notifier uid> ./TDinsight.sh -a http://localhost:6041 -u root -p taosdata -E <notifier uid>
``` ```
运行程序并重启 Grafana 服务,打开面板:`http://localhost:3000/d/tdinsight`。 运行程序并重启 Grafana 服务,打开面板:`http://localhost:3000/d/tdinsight`。
@ -270,7 +270,7 @@ TDinsight dashboard 数据来源于 log 库存放监控数据的默认db
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||监控指标值| |gauge|DOUBLE||监控指标值|
|client\_ip|NCHAR|TAG|client ip| |client\_ip|NCHAR|TAG|client ip|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
|request\_method|NCHAR|TAG|request method| |request\_method|NCHAR|TAG|request method|
@ -284,7 +284,7 @@ TDinsight dashboard 数据来源于 log 库存放监控数据的默认db
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||监控指标值| |gauge|DOUBLE||监控指标值|
|client\_ip|NCHAR|TAG|client ip| |client\_ip|NCHAR|TAG|client ip|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
|request\_method|NCHAR|TAG|request method| |request\_method|NCHAR|TAG|request method|
@ -298,7 +298,7 @@ TDinsight dashboard 数据来源于 log 库存放监控数据的默认db
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||监控指标值| |gauge|DOUBLE||监控指标值|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
### taosadapter\_restful\_http\_request\_summary\_milliseconds 表 ### taosadapter\_restful\_http\_request\_summary\_milliseconds 表
@ -326,7 +326,7 @@ TDinsight dashboard 数据来源于 log 库存放监控数据的默认db
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||监控指标值| |gauge|DOUBLE||监控指标值|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|
### taosadapter\_system\_cpu\_percent 表 ### taosadapter\_system\_cpu\_percent 表
@ -336,5 +336,5 @@ TDinsight dashboard 数据来源于 log 库存放监控数据的默认db
|field|type|is\_tag|comment| |field|type|is\_tag|comment|
|:----|:---|:-----|:------| |:----|:---|:-----|:------|
|\_ts|TIMESTAMP||timestamp| |\_ts|TIMESTAMP||timestamp|
|guage|DOUBLE||监控指标值| |gauge|DOUBLE||监控指标值|
|endpoint|NCHAR|TAG|taosadpater endpoint| |endpoint|NCHAR|TAG|taosadpater endpoint|

View File

@ -247,4 +247,10 @@ launchctl limit maxfiles
该提示是创建 db 的 vnode 数量不够了,需要的 vnode 不能超过了 dnode 中 vnode 的上限。因为系统默认是一个 dnode 中有 CPU 核数两倍的 vnode也可以通过配置文件中的参数 supportVnodes 控制。 该提示是创建 db 的 vnode 数量不够了,需要的 vnode 不能超过了 dnode 中 vnode 的上限。因为系统默认是一个 dnode 中有 CPU 核数两倍的 vnode也可以通过配置文件中的参数 supportVnodes 控制。
正常调大 taos.cfg 中 supportVnodes 参数即可。 正常调大 taos.cfg 中 supportVnodes 参数即可。
### 21 【查询】在服务器上的使用 tao-CLI 能查到指定时间段的数据,但在客户端机器上查不到?
这种情况是因为客户端与服务器上设置的时区不一致导致的,调整客户端与服务器的时区一致即可解决。
### 22 【表名】表名确认是存在的,但写入或查询时报表不存在错误,非常奇怪,什么原因?
TDengine 中的所有名称,包括数据库名、表名等都是区分大小写的,如果这些名称在程序或 taos-CLI 中没有使用反引号(`)括起来使用,即使你输入的是大写的,引擎也会转化成小写来使用,如果名称前后加上了反引号,引擎就不会再转化成小写,会保持原样来使用。

View File

@ -351,6 +351,7 @@ typedef struct {
rocksdb_writeoptions_t *writeoptions; rocksdb_writeoptions_t *writeoptions;
rocksdb_readoptions_t *readoptions; rocksdb_readoptions_t *readoptions;
rocksdb_writebatch_t *writebatch; rocksdb_writebatch_t *writebatch;
rocksdb_writebatch_t *rwritebatch;
TdThreadMutex rMutex; TdThreadMutex rMutex;
STSchema *pTSchema; STSchema *pTSchema;
} SRocksCache; } SRocksCache;

View File

@ -164,8 +164,10 @@ static int32_t tsdbOpenRocksCache(STsdb *pTsdb) {
} }
rocksdb_writebatch_t *writebatch = rocksdb_writebatch_create(); rocksdb_writebatch_t *writebatch = rocksdb_writebatch_create();
rocksdb_writebatch_t *rwritebatch = rocksdb_writebatch_create();
pTsdb->rCache.writebatch = writebatch; pTsdb->rCache.writebatch = writebatch;
pTsdb->rCache.rwritebatch = rwritebatch;
pTsdb->rCache.my_comparator = cmp; pTsdb->rCache.my_comparator = cmp;
pTsdb->rCache.options = options; pTsdb->rCache.options = options;
pTsdb->rCache.writeoptions = writeoptions; pTsdb->rCache.writeoptions = writeoptions;
@ -198,6 +200,7 @@ static void tsdbCloseRocksCache(STsdb *pTsdb) {
rocksdb_close(pTsdb->rCache.db); rocksdb_close(pTsdb->rCache.db);
rocksdb_flushoptions_destroy(pTsdb->rCache.flushoptions); rocksdb_flushoptions_destroy(pTsdb->rCache.flushoptions);
rocksdb_writebatch_destroy(pTsdb->rCache.writebatch); rocksdb_writebatch_destroy(pTsdb->rCache.writebatch);
rocksdb_writebatch_destroy(pTsdb->rCache.rwritebatch);
rocksdb_readoptions_destroy(pTsdb->rCache.readoptions); rocksdb_readoptions_destroy(pTsdb->rCache.readoptions);
rocksdb_writeoptions_destroy(pTsdb->rCache.writeoptions); rocksdb_writeoptions_destroy(pTsdb->rCache.writeoptions);
rocksdb_options_destroy(pTsdb->rCache.options); rocksdb_options_destroy(pTsdb->rCache.options);
@ -208,14 +211,18 @@ static void tsdbCloseRocksCache(STsdb *pTsdb) {
taosMemoryFree(pTsdb->rCache.pTSchema); taosMemoryFree(pTsdb->rCache.pTSchema);
} }
static void rocksMayWrite(STsdb *pTsdb, bool force) { static void rocksMayWrite(STsdb *pTsdb, bool force, bool read) {
rocksdb_writebatch_t *wb = pTsdb->rCache.writebatch; rocksdb_writebatch_t *wb = pTsdb->rCache.writebatch;
if (read) {
if (force || rocksdb_writebatch_count(wb) >= 1024) { wb = pTsdb->rCache.rwritebatch;
}
int count = rocksdb_writebatch_count(wb);
if ((force && count > 0) || count >= 1024) {
char *err = NULL; char *err = NULL;
rocksdb_write(pTsdb->rCache.db, pTsdb->rCache.writeoptions, wb, &err); rocksdb_write(pTsdb->rCache.db, pTsdb->rCache.writeoptions, wb, &err);
if (NULL != err) { if (NULL != err) {
tsdbError("vgId:%d, %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, err); tsdbError("vgId:%d, %s failed at line %d, count: %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, count,
err);
rocksdb_free(err); rocksdb_free(err);
} }
@ -227,7 +234,8 @@ int32_t tsdbCacheCommit(STsdb *pTsdb) {
int32_t code = 0; int32_t code = 0;
char *err = NULL; char *err = NULL;
rocksMayWrite(pTsdb, true); rocksMayWrite(pTsdb, true, false);
rocksMayWrite(pTsdb, true, true);
rocksdb_flush(pTsdb->rCache.db, pTsdb->rCache.flushoptions, &err); rocksdb_flush(pTsdb->rCache.db, pTsdb->rCache.flushoptions, &err);
if (NULL != err) { if (NULL != err) {
tsdbError("vgId:%d, %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, err); tsdbError("vgId:%d, %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, err);
@ -453,7 +461,7 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow
taosMemoryFree(values_list); taosMemoryFree(values_list);
taosMemoryFree(values_list_sizes); taosMemoryFree(values_list_sizes);
rocksMayWrite(pTsdb, false); rocksMayWrite(pTsdb, false, false);
taosThreadMutexUnlock(&pTsdb->rCache.rMutex); taosThreadMutexUnlock(&pTsdb->rCache.rMutex);
_exit: _exit:
@ -537,7 +545,7 @@ int32_t tsdbCacheGetSlow(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheR
} }
// store result back to rocks cache // store result back to rocks cache
wb = pTsdb->rCache.writebatch; wb = pTsdb->rCache.rwritebatch;
char *value = NULL; char *value = NULL;
size_t vlen = 0; size_t vlen = 0;
tsdbCacheSerialize(pLastCol, &value, &vlen); tsdbCacheSerialize(pLastCol, &value, &vlen);
@ -552,7 +560,7 @@ int32_t tsdbCacheGetSlow(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheR
} }
if (wb) { if (wb) {
rocksMayWrite(pTsdb, false); rocksMayWrite(pTsdb, false, true);
} }
taosThreadMutexUnlock(&pTsdb->rCache.rMutex); taosThreadMutexUnlock(&pTsdb->rCache.rMutex);
@ -602,7 +610,7 @@ static SLastCol *tsdbCacheLoadCol(STsdb *pTsdb, SCacheRowsReader *pr, int16_t sl
} }
// store result back to rocks cache // store result back to rocks cache
wb = pTsdb->rCache.writebatch; wb = pTsdb->rCache.rwritebatch;
char *value = NULL; char *value = NULL;
size_t vlen = 0; size_t vlen = 0;
tsdbCacheSerialize(pLastCol, &value, &vlen); tsdbCacheSerialize(pLastCol, &value, &vlen);
@ -620,7 +628,7 @@ static SLastCol *tsdbCacheLoadCol(STsdb *pTsdb, SCacheRowsReader *pr, int16_t sl
} }
if (wb) { if (wb) {
rocksMayWrite(pTsdb, false); rocksMayWrite(pTsdb, false, true);
} }
taosThreadMutexUnlock(&pTsdb->rCache.rMutex); taosThreadMutexUnlock(&pTsdb->rCache.rMutex);
@ -671,6 +679,13 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr
pLastCol = &noneCol; pLastCol = &noneCol;
} }
taosArraySet(pLastArray, idxKey->idx, pLastCol);
// taosArrayRemove(remainCols, i);
if (!pTmpColArray) {
continue;
}
SLastCol *pTmpLastCol = taosMemoryCalloc(1, sizeof(SLastCol)); SLastCol *pTmpLastCol = taosMemoryCalloc(1, sizeof(SLastCol));
*pTmpLastCol = *pLastCol; *pTmpLastCol = *pLastCol;
pLastCol = pTmpLastCol; pLastCol = pTmpLastCol;
@ -687,7 +702,7 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr
} }
// store result back to rocks cache // store result back to rocks cache
wb = pTsdb->rCache.writebatch; wb = pTsdb->rCache.rwritebatch;
char *value = NULL; char *value = NULL;
size_t vlen = 0; size_t vlen = 0;
tsdbCacheSerialize(pLastCol, &value, &vlen); tsdbCacheSerialize(pLastCol, &value, &vlen);
@ -696,13 +711,10 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr
size_t klen = ROCKS_KEY_LEN; size_t klen = ROCKS_KEY_LEN;
rocksdb_writebatch_put(wb, (char *)key, klen, value, vlen); rocksdb_writebatch_put(wb, (char *)key, klen, value, vlen);
taosMemoryFree(value); taosMemoryFree(value);
taosArraySet(pLastArray, idxKey->idx, pLastCol);
// taosArrayRemove(remainCols, i);
} }
if (wb) { if (wb) {
rocksMayWrite(pTsdb, false); rocksMayWrite(pTsdb, false, true);
} }
taosArrayDestroy(pTmpColArray); taosArrayDestroy(pTmpColArray);
@ -932,7 +944,7 @@ int32_t tsdbCacheDel(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSKEY sKey, TSKE
size_t *values_list_sizes = taosMemoryCalloc(num_keys * 2, sizeof(size_t)); size_t *values_list_sizes = taosMemoryCalloc(num_keys * 2, sizeof(size_t));
char **errs = taosMemoryCalloc(num_keys * 2, sizeof(char *)); char **errs = taosMemoryCalloc(num_keys * 2, sizeof(char *));
taosThreadMutexLock(&pTsdb->rCache.rMutex); taosThreadMutexLock(&pTsdb->rCache.rMutex);
rocksMayWrite(pTsdb, true); rocksMayWrite(pTsdb, true, false);
rocksdb_multi_get(pTsdb->rCache.db, pTsdb->rCache.readoptions, num_keys * 2, (const char *const *)keys_list, rocksdb_multi_get(pTsdb->rCache.db, pTsdb->rCache.readoptions, num_keys * 2, (const char *const *)keys_list,
keys_list_sizes, values_list, values_list_sizes, errs); keys_list_sizes, values_list, values_list_sizes, errs);
for (int i = 0; i < num_keys; ++i) { for (int i = 0; i < num_keys; ++i) {
@ -971,7 +983,7 @@ int32_t tsdbCacheDel(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSKEY sKey, TSKE
taosMemoryFree(values_list); taosMemoryFree(values_list);
taosMemoryFree(values_list_sizes); taosMemoryFree(values_list_sizes);
rocksMayWrite(pTsdb, true); rocksMayWrite(pTsdb, true, false);
taosThreadMutexUnlock(&pTsdb->rCache.rMutex); taosThreadMutexUnlock(&pTsdb->rCache.rMutex);
_exit: _exit:

View File

@ -3112,6 +3112,10 @@ static int32_t doLoadLastBlockSequentially(STsdbReader* pReader) {
// load the last data block of current table // load the last data block of current table
STableBlockScanInfo* pScanInfo = *(STableBlockScanInfo**)pStatus->pTableIter; STableBlockScanInfo* pScanInfo = *(STableBlockScanInfo**)pStatus->pTableIter;
if (pReader->pIgnoreTables && taosHashGet(*pReader->pIgnoreTables, &pScanInfo->uid, sizeof(pScanInfo->uid))) { if (pReader->pIgnoreTables && taosHashGet(*pReader->pIgnoreTables, &pScanInfo->uid, sizeof(pScanInfo->uid))) {
// reset the index in last block when handing a new file
doCleanupTableScanInfo(pScanInfo);
pStatus->mapDataCleaned = true;
bool hasNexTable = moveToNextTable(pUidList, pStatus); bool hasNexTable = moveToNextTable(pUidList, pStatus);
if (!hasNexTable) { if (!hasNexTable) {
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;

View File

@ -2219,6 +2219,13 @@ static bool lastRowScanOptMayBeOptimized(SLogicNode* pNode) {
FOREACH(pFunc, ((SAggLogicNode*)pNode)->pAggFuncs) { FOREACH(pFunc, ((SAggLogicNode*)pNode)->pAggFuncs) {
SFunctionNode* pAggFunc = (SFunctionNode*)pFunc; SFunctionNode* pAggFunc = (SFunctionNode*)pFunc;
if (FUNCTION_TYPE_LAST == pAggFunc->funcType) { if (FUNCTION_TYPE_LAST == pAggFunc->funcType) {
SNode* pPar = nodesListGetNode(pAggFunc->pParameterList, 0);
if (QUERY_NODE_COLUMN == nodeType(pPar)) {
SColumnNode* pCol = (SColumnNode*)pPar;
if (pCol->colType == COLUMN_TYPE_TAG) {
return false;
}
}
if (hasSelectFunc || QUERY_NODE_VALUE == nodeType(nodesListGetNode(pAggFunc->pParameterList, 0))) { if (hasSelectFunc || QUERY_NODE_VALUE == nodeType(nodesListGetNode(pAggFunc->pParameterList, 0))) {
return false; return false;
} }
@ -2319,6 +2326,7 @@ static int32_t lastRowScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogic
if (NULL != cxt.pLastCols) { if (NULL != cxt.pLastCols) {
cxt.doAgg = false; cxt.doAgg = false;
lastRowScanOptSetLastTargets(pScan->pScanCols, cxt.pLastCols, true); lastRowScanOptSetLastTargets(pScan->pScanCols, cxt.pLastCols, true);
nodesWalkExprs(pScan->pScanPseudoCols, lastRowScanOptSetColDataType, &cxt);
lastRowScanOptSetLastTargets(pScan->node.pTargets, cxt.pLastCols, false); lastRowScanOptSetLastTargets(pScan->node.pTargets, cxt.pLastCols, false);
nodesClearList(cxt.pLastCols); nodesClearList(cxt.pLastCols);
} }