docs: add descriptions for log configuration
This commit is contained in:
parent
fb28fc578a
commit
1c43d86b95
|
@ -239,40 +239,44 @@ d4,2017-07-14T10:40:00.006+08:00,-2.740636,10,-0.893545,7,California.LosAngles
|
|||
|
||||
- `plugins_home`:外部数据源连接器所在目录。
|
||||
- `data_dir`:数据文件存放目录。
|
||||
- `logs_home`:日志文件存放目录,`taosX` 日志文件的前缀为 `taosx.log`,外部数据源有自己的日志文件名前缀。
|
||||
- `log_level`:日志等级,可选级别包括 `error`、`warn`、`info`、`debug`、`trace`,默认值为 `info`。
|
||||
- `log_keep_days`:日志的最大存储天数,`taosX` 日志将按天划分为不同的文件。
|
||||
- `instanceId`:当前 explorer 服务的实例 ID,如果同一台机器上启动了多个 explorer 实例,必须保证各个实例的实例 ID 互不相同。
|
||||
- `logs_home`:日志文件存放目录,`taosX` 日志文件的前缀为 `taosx.log`,外部数据源有自己的日志文件名前缀。已弃用,请使用 `log.path` 代替。
|
||||
- `log_level`:日志等级,可选级别包括 `error`、`warn`、`info`、`debug`、`trace`,默认值为 `info`。已弃用,请使用 `log.level` 代替。
|
||||
- `log_keep_days`:日志的最大存储天数,`taosX` 日志将按天划分为不同的文件。已弃用,请使用 `log.keepDays` 代替。
|
||||
- `jobs`:每个运行时的最大线程数。在服务模式下,线程总数为 `jobs*2`,默认线程数为`当前服务器内核*2`。
|
||||
- `serve.listen`:是 `taosX` REST API 监听地址,默认值为 `0.0.0.0:6050`。
|
||||
- `serve.database_url`:`taosX` 数据库的地址,格式为 `sqlite:<path>`。
|
||||
- `serve.request_timeout`:全局接口 API 超时时间。
|
||||
- `monitor.fqdn`:`taosKeeper` 服务的 FQDN,没有默认值,置空则关闭监控功能。
|
||||
- `monitor.port`:`taosKeeper` 服务的端口,默认`6043`。
|
||||
- `monitor.interval`:向 `taosKeeper` 发送指标的频率,默认为每 10 秒一次,只有 1 到 10 之间的值才有效。
|
||||
- `log.path`:日志文件存放的目录
|
||||
- `log.level`:日志级别,可选值为 "error", "warn", "info", "debug", "trace"。
|
||||
- `log.compress`:日志文件滚动后的文件是否进行压缩。
|
||||
- `log.rotationCount`:日志文件目录下最多保留的文件数,超出数量的旧文件被删除
|
||||
- `log.rotationSize`:触发日志文件滚动的文件大小(单位为字节),当日志文件超出此大小后会生成一个新文件,新的日志会写入新文件
|
||||
- `log.reservedDiskSize`:日志所在磁盘停止写入日志的阈值(单位为字节),当磁盘剩余空间达到此大小后停止写入日志。
|
||||
- `log.keepDays`:日志文件保存的天数,超过此天数的旧日志文件会被删除
|
||||
- `log.loggers`:指定模块的日志输出级别,格式为 `"modname" = "level"`,同时适配 tracing 库语法,可以根据 `modname[span{field=value}]=level`,其中 `level` 为日志级别
|
||||
|
||||
如下所示:
|
||||
|
||||
```toml
|
||||
# plugins home
|
||||
#plugins_home = "/usr/local/taos/plugins" # on linux/macOS
|
||||
#plugins_home = "C:\\TDengine\\plugins" # on windows
|
||||
|
||||
# data dir
|
||||
#data_dir = "/var/lib/taos/taosx" # on linux/macOS
|
||||
#data_dir = "C:\\TDengine\\data\\taosx" # on windows
|
||||
|
||||
# logs home
|
||||
#logs_home = "/var/log/taos" # on linux/macOS
|
||||
#logs_home = "C:\\TDengine\\log" # on windows
|
||||
|
||||
# log level: off/error/warn/info/debug/trace
|
||||
#log_level = "info"
|
||||
|
||||
# log keep days
|
||||
#log_keep_days = 30
|
||||
|
||||
# number of jobs, default to 0, will use `jobs` number of works for TMQ
|
||||
# number of threads used for tokio workers, default to 0 (means cores * 2)
|
||||
#jobs = 0
|
||||
|
||||
# enable OpenTelemetry tracing and metrics exporter
|
||||
#otel = false
|
||||
|
||||
# server instance id
|
||||
#
|
||||
# The instanceId of each instance is unique on the host
|
||||
# instanceId = 16
|
||||
|
||||
[serve]
|
||||
# listen to ip:port address
|
||||
#listen = "0.0.0.0:6050"
|
||||
|
@ -280,13 +284,66 @@ d4,2017-07-14T10:40:00.006+08:00,-2.740636,10,-0.893545,7,California.LosAngles
|
|||
# database url
|
||||
#database_url = "sqlite:taosx.db"
|
||||
|
||||
# default global request timeout which unit is second. This parameter takes effect for certain interfaces that require a timeout setting
|
||||
#request_timeout = 30
|
||||
|
||||
[monitor]
|
||||
# FQDN of taosKeeper service, no default value
|
||||
#fqdn = "localhost"
|
||||
# port of taosKeeper service, default 6043
|
||||
|
||||
# Port of taosKeeper service, default 6043
|
||||
#port = 6043
|
||||
# how often to send metrics to taosKeeper, default every 10 seconds. Only value from 1 to 10 is valid.
|
||||
|
||||
# How often to send metrics to taosKeeper, default every 10 seconds. Only value from 1 to 10 is valid.
|
||||
#interval = 10
|
||||
|
||||
|
||||
# log configuration
|
||||
[log]
|
||||
# All log files are stored in this directory
|
||||
#
|
||||
#path = "/var/log/taos" # on linux/macOS
|
||||
#path = "C:\\TDengine\\log" # on windows
|
||||
|
||||
# log filter level
|
||||
#
|
||||
#level = "info"
|
||||
|
||||
# Compress archived log files or not
|
||||
#
|
||||
#compress = false
|
||||
|
||||
# The number of log files retained by the current explorer server instance in the `path` directory
|
||||
#
|
||||
#rotationCount = 30
|
||||
|
||||
# Rotate when the log file reaches this size
|
||||
#
|
||||
#rotationSize = "1GB"
|
||||
|
||||
# Log downgrade when the remaining disk space reaches this size, only logging `ERROR` level logs
|
||||
#
|
||||
#reservedDiskSize = "1GB"
|
||||
|
||||
# The number of days log files are retained
|
||||
#
|
||||
#keepDays = 30
|
||||
|
||||
# Watching the configuration file for log.loggers changes, default to true.
|
||||
#
|
||||
#watching = true
|
||||
|
||||
# Customize the log output level of modules, and changes will be applied after modifying the file when log.watching is enabled
|
||||
#
|
||||
# ## Examples:
|
||||
#
|
||||
# crate = "error"
|
||||
# crate::mod1::mod2 = "info"
|
||||
# crate::span[field=value] = "warn"
|
||||
#
|
||||
[log.loggers]
|
||||
#"actix_server::accept" = "warn"
|
||||
#"taos::query" = "warn"
|
||||
```
|
||||
|
||||
### 启动
|
||||
|
|
|
@ -12,17 +12,67 @@ sidebar_label: taosX-Agent
|
|||
- `endpoint`: 必填,`taosX` 的 GRPC 服务地址。
|
||||
- `token`: 必填,在 `Explorer` 上创建 `Agent` 时,产生的 Token。
|
||||
- `compression`: 非必填,可配置为 `ture` 或 `false`, 默认为 `false`。配置为`true`, 则开启 `Agent` 和 `taosX` 通信数据压缩。
|
||||
- `log_level`: 非必填,日志级别,默认为 `info`, 同 `taosX` 一样,支持 `error`,`warn`,`info`,`debug`,`trace` 五级。
|
||||
- `log_keep_days`:非必填,日志保存天数,默认为 `30` 天。
|
||||
- `log_level`: 非必填,日志级别,默认为 `info`, 同 `taosX` 一样,支持 `error`,`warn`,`info`,`debug`,`trace` 五级。已弃用,请使用 `log.level` 代替。
|
||||
- `log_keep_days`:非必填,日志保存天数,默认为 `30` 天。已弃用,请使用 `log.keepDays` 代替。
|
||||
- `log.path`:日志文件存放的目录
|
||||
- `log.level`:日志级别,可选值为 "error", "warn", "info", "debug", "trace"。
|
||||
- `log.compress`:日志文件滚动后的文件是否进行压缩。
|
||||
- `log.rotationCount`:日志文件目录下最多保留的文件数,超出数量的旧文件被删除
|
||||
- `log.rotationSize`:触发日志文件滚动的文件大小(单位为字节),当日志文件超出此大小后会生成一个新文件,新的日志会写入新文件
|
||||
- `log.reservedDiskSize`:日志所在磁盘停止写入日志的阈值(单位为字节),当磁盘剩余空间达到此大小后停止写入日志。
|
||||
- `log.keepDays`:日志文件保存的天数,超过此天数的旧日志文件会被删除
|
||||
|
||||
如下所示:
|
||||
|
||||
```TOML
|
||||
endpoint = "grpc://<taosx-ip>:6055"
|
||||
token = "<token>"
|
||||
compression = true
|
||||
log_level = "info"
|
||||
log_keep_days = 30
|
||||
# taosX service endpoint
|
||||
#
|
||||
#endpoint = "http://localhost:6055"
|
||||
|
||||
# !important!
|
||||
# Uncomment it and copy-paste the token generated in Explorer.
|
||||
#
|
||||
#token = ""
|
||||
|
||||
# server instance id
|
||||
#
|
||||
# The instanceId of each instance is unique on the host
|
||||
# instanceId = 64
|
||||
|
||||
# enable communication data compression between Agent and taosX
|
||||
#
|
||||
#compression = true
|
||||
|
||||
# log configuration
|
||||
[log]
|
||||
# All log files are stored in this directory
|
||||
#
|
||||
#path = "/var/log/taos" # on linux/macOS
|
||||
#path = "C:\\TDengine\\log" # on windows
|
||||
|
||||
# log filter level
|
||||
#
|
||||
#level = "info"
|
||||
|
||||
# Compress archived log files or not
|
||||
#
|
||||
#compress = false
|
||||
|
||||
# The number of log files retained by the current explorer server instance in the `path` directory
|
||||
#
|
||||
#rotationCount = 30
|
||||
|
||||
# Rotate when the log file reaches this size
|
||||
#
|
||||
#rotationSize = "1GB"
|
||||
|
||||
# Log downgrade when the remaining disk space reaches this size, only logging `ERROR` level logs
|
||||
#
|
||||
#reservedDiskSize = "1GB"
|
||||
|
||||
# The number of days log files are retained
|
||||
#
|
||||
#keepDays = 30
|
||||
```
|
||||
|
||||
您不必对配置文件如何设置感到疑惑,阅读并跟随 `Explorer` 中创建 `Agent` 的提示进行操作,您可以对配置文件进行查看、修改和检查。
|
||||
|
|
|
@ -15,36 +15,111 @@ taosEexplorer 无需单独安装,从 TDengine 3.3.0.0 版本开始,它随着
|
|||
在启动 taosExplorer 之前,请确保配置文件中的内容正确。
|
||||
|
||||
```TOML
|
||||
# listen port
|
||||
# This is a automacically generated configuration file for Explorer in [TOML](https://toml.io/) format.
|
||||
#
|
||||
# Here is a full list of available options.
|
||||
|
||||
# Explorer server port to listen on.
|
||||
# Default is 6060.
|
||||
#
|
||||
port = 6060
|
||||
|
||||
# listen address for IPv4
|
||||
# IPv4 listen address.
|
||||
# Default is 0.0.0.0
|
||||
addr = "0.0.0.0"
|
||||
|
||||
# listen address for IPv4
|
||||
# IPv6 listen address.
|
||||
|
||||
# ipv6 = "::1"
|
||||
|
||||
# log level. Possible: error,warn,info,debug,trace
|
||||
# explorer server instance id
|
||||
#
|
||||
# The instanceId of each instance is unique on the host
|
||||
# instanceId = 1
|
||||
|
||||
# Explorer server log level.
|
||||
# Default is "info"
|
||||
#
|
||||
# Deprecated: use log.level instead
|
||||
log_level = "info"
|
||||
|
||||
# taosAdapter address.
|
||||
# All data files are stored in this directory
|
||||
# data_dir = "/var/lib/taos/explorer" # Default for Linux
|
||||
# data_dir = "C:\\TDengine\\data\\explorer" # Default for Windows
|
||||
|
||||
# REST API endpoint to connect to the cluster.
|
||||
# This configuration is also the target for data migration tasks.
|
||||
#
|
||||
# Default is "http://localhost:6041" - the default endpoint for REST API.
|
||||
#
|
||||
cluster = "http://localhost:6041"
|
||||
|
||||
# taosX gRPC address
|
||||
# native endpoint to connect to the cluster.
|
||||
# Default is disabled. To enable it, set it to the native API URL like "taos://localhost:6030" and uncomment it.
|
||||
# If you enable it, you will get more performance for data migration tasks.
|
||||
#
|
||||
# cluster_native = "taos://localhost:6030"
|
||||
|
||||
# API endpoint for data replication/backup/data sources. No default option.
|
||||
# Set it to API URL like "http://localhost:6050".
|
||||
#
|
||||
x_api = "http://localhost:6050"
|
||||
|
||||
# GRPC endpoint for "Agent"s.
|
||||
# Default is "http://localhost:6055" - the default endpoint for taosX grpc API.
|
||||
# You should set it to public IP or FQDN name like:
|
||||
# "http://192.168.111.111:6055" or "http://node1.company.domain:6055" and
|
||||
# ensure to add the port to the exception list of the firewall if it enabled.
|
||||
grpc = "http://localhost:6055"
|
||||
|
||||
# CORS configuration switch, it allows cross-origin access
|
||||
cors = false
|
||||
cors = true
|
||||
|
||||
# Enable ssl: if the following two files exist, enable ssl protocol
|
||||
# Enable ssl
|
||||
# If the following two files exist, enable ssl protocol
|
||||
#
|
||||
[ssl]
|
||||
|
||||
# SSL certificate
|
||||
#certificate = "/path/to/ca.file"
|
||||
#
|
||||
# certificate = "/path/to/ca.file" # on linux/macOS
|
||||
# certificate = "C:\\path\\to\\ca.file" # on windows
|
||||
|
||||
# SSL certificate key
|
||||
#certificate_key = "/path/to/key.file"
|
||||
#
|
||||
# certificate_key = "/path/to/key.file" # on linux/macOS
|
||||
# certificate_key = "C:\\path\\to\\key.file" # on windows
|
||||
|
||||
# log configuration
|
||||
[log]
|
||||
# All log files are stored in this directory
|
||||
#
|
||||
# path = "/var/log/taos" # on linux/macOS
|
||||
# path = "C:\\TDengine\\log" # on windows
|
||||
|
||||
# log filter level
|
||||
#
|
||||
# level = "info"
|
||||
|
||||
# Compress archived log files or not
|
||||
#
|
||||
# compress = false
|
||||
|
||||
# The number of log files retained by the current explorer server instance in the `path` directory
|
||||
#
|
||||
# rotationCount = 30
|
||||
|
||||
# Rotate when the log file reaches this size
|
||||
#
|
||||
# rotationSize = "1GB"
|
||||
|
||||
# Log downgrade when the remaining disk space reaches this size, only logging `ERROR` level logs
|
||||
#
|
||||
# reservedDiskSize = "1GB"
|
||||
|
||||
# The number of days log files are retained
|
||||
#
|
||||
# keepDays = 30
|
||||
```
|
||||
|
||||
说明:
|
||||
|
@ -52,13 +127,23 @@ cors = false
|
|||
- `port`:taosExplorer 服务绑定的端口。
|
||||
- `addr`:taosExplorer 服务绑定的 IPv4 地址,默认为 `0.0.0.0`。如需修改,请配置为 `localhost` 之外的地址以对外提供服务。
|
||||
- `ipv6`:taosExplorer 服务绑定的 IPv6 地址,默认不绑定 IPv6 地址。
|
||||
- `log_level`:日志级别,可选值为 "error", "warn", "info", "debug", "trace"。
|
||||
- `instanceId`:当前 explorer 服务的实例 ID,如果同一台机器上启动了多个 explorer 实例,必须保证各个实例的实例 ID 互不相同。
|
||||
- `log_level`:日志级别,可选值为 "error", "warn", "info", "debug", "trace"。此参数已弃用,请使用 `log.level` 代替。
|
||||
- `cluster`:TDengine 集群的 taosAdapter 地址。
|
||||
- `cluster_native`:TDengine 集群的原生连接地址,默认关闭。
|
||||
- `x_api`:taosX 的 gRPC 地址。
|
||||
- `grpc`: taosX 代理向 taosX 建立连接的 gRPC 地址.
|
||||
- `grpc`:taosX 代理向 taosX 建立连接的 gRPC 地址.
|
||||
- `cors`:CORS 配置开关,默认为 `false`。当为 `true` 时,允许跨域访问。
|
||||
- `ssl.certificate`: SSL 证书(如果同时设置了 certificate 与 certificate_key 两个参数,则启用 HTTPS 服务,否则不启用)。
|
||||
- `ssl.certificate_key`: SSL 证书密钥。
|
||||
- `ssl.certificate`:SSL 证书(如果同时设置了 certificate 与 certificate_key 两个参数,则启用 HTTPS 服务,否则不启用)。
|
||||
- `ssl.certificate_key`:SSL 证书密钥。
|
||||
- `log.path`:日志文件存放的目录
|
||||
- `log.level`:日志级别,可选值为 "error", "warn", "info", "debug", "trace"。
|
||||
- `log.compress`:日志文件滚动后的文件是否进行压缩。
|
||||
- `log.rotationCount`:日志文件目录下最多保留的文件数,超出数量的旧文件被删除
|
||||
- `log.rotationSize`:触发日志文件滚动的文件大小(单位为字节),当日志文件超出此大小后会生成一个新文件,新的日志会写入新文件
|
||||
- `log.reservedDiskSize`:日志所在磁盘停止写入日志的阈值(单位为字节),当磁盘剩余空间达到此大小后停止写入日志。
|
||||
- `log.keepDays`:日志文件保存的天数,超过此天数的旧日志文件会被删除
|
||||
|
||||
|
||||
## 启动停止
|
||||
|
||||
|
|
Loading…
Reference in New Issue