CompactFullWriteColdDuration is the duration at which the engine
will compact all TSM files in a shard if it hasn’t received a
write or delete
shard是有时间范围的,超过了这个时间范围就不会往这个shard里写数据了,
所以超过这个时间没有收到写或者删除操作时,会压缩所有的tsm文件为一个文件。
compact-full-write-cold-duration = “4h”
The maximum number of concurrent full and level compactions that can run at one time. A
value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater
than 0 limits compactions to that value. This setting does not apply
to cache snapshotting.
同时可以运行的并发满压缩和级别压缩的最大数量。
值为0将导致运行时使用runtime. gomaxprocs(0)——这意味着使用所有处理器。
此设置不适用于缓存快照。 默认0就完事了。
max-concurrent-compactions = 0
CompactThroughput is the rate limit in bytes per second that we
will allow TSM compactions to write to disk. Note that short bursts are allowed
to happen at a possibly larger value, set by CompactThroughputBurst
每秒压缩tsm写入磁盘时的速率,48m/s
compact-throughput = “48m”
CompactThroughputBurst is the rate limit in bytes per second that we
will allow TSM compactions to write to disk.
允许短时间爆发的更大速率,每秒压缩tsm写入磁盘时的速率,48m/s
compact-throughput-burst = “48m”
If true, then the mmap advise value MADV_WILLNEED will be provided to the kernel with respect to
TSM files. This setting has been found to be problematic on some kernels, and defaults to off.
It might help users who have slow disks in some cases.
默认false即可
tsm-use-madv-willneed = false
Settings for the inmem index
The maximum series allowed per database before writes are dropped. This limit can prevent
high cardinality issues at the database level. This limit can be disabled by setting it to
0.
每个数据库允许的最大series数,默认设置是一百万。series 指 tag、measurement、policy 相同的数据集合
将该设置更改为0,以允许每个数据库的序列数量不受限制。
若超过则会返回500错误,并提示{“error”:“max series per database exceeded: ”}
max-series-per-database = 1000000
The maximum number of tag values per tag that are allowed before writes are dropped. This limit
can prevent high cardinality tag values from being written to a measurement. This limit can be
disabled by setting it to 0.
设置每一个tag允许的value最大数量,默认10W,设置0可以取消限制。
若超过该数值,则会返回错误。
max-values-per-tag = 100000
Settings for the tsi1 index
The threshold, in bytes, when an index write-ahead log file will compact
into an index file. Lower sizes will cause log files to be compacted more
quickly and result in lower heap usage at the expense of write throughput.
Higher sizes will be compacted less frequently, store more series in-memory,
and provide higher write throughput.
Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
Values without a size suffix are in bytes.
索引提前写日志文件压缩到索引文件中时的阈值(以字节为单位)。较小的大小将导致日志文件被压缩得更多
这会导致以写吞吐量为代价的较低堆使用率。更大的尺寸压缩频率更低,在内存中存储更多系列,并提供更高的写吞吐量。
有效的大小后缀是k、m或g(大小写不敏感,1024 = 1k)。没有大小后缀的#值以字节为单位。
max-index-log-file-size = “1m”
The size of the internal cache used in the TSI index to store previously
calculated series results. Cached results will be returned quickly from the cache rather
than needing to be recalculated when a subsequent query with a matching tag key/value
predicate is executed. Setting this value to 0 will disable the cache, which may
lead to query performance issues.
This value should only be increased if it is known that the set of regularly used
tag key/value predicates across all measurements for a database is larger than 100. An
increase in cache size may lead to an increase in heap usage.
以前TSI索引中用于存储的内部缓存的大小计算的级数结果。
缓存的结果将更快地从缓存中返回,当后续查询带有匹配的标签键/值时,不需要重新计算
将此值设置为0将禁用缓存,这可能会导致缓存失效导致查询性能问题。
增大此值会增加堆的使用,默认100。没太理解后续用到再说
series-id-set-cache-size = 100
[coordinator]
Controls the clustering service configuration.
[coordinator]
The default time a write request will wait until a “timeout” error is returned to the caller.
写超时时间
write-timeout = “10s”
The maximum number of concurrent queries allowed to be executing at one time. If a query is
executed and exceeds this limit, an error is returned to the caller. This limit can be disabled
by setting it to 0.
同一时间查询请求最大并发数,超过这个阈值,将返回异常给调用者。如果设置为0,将禁用该设置,并发数无限制。
max-concurrent-queries = 0
The maximum time a query will is allowed to execute before being killed by the system. This limit
can help prevent run away queries. Setting the value to 0 disables the limit.
查询请求超时时间,0无限制
query-timeout = “0s”
The time threshold when a query will be logged as a slow query. This limit can be set to help
discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
查询慢日志记录阈值,即为查询多久被记录为慢日志。0为无限制。
log-queries-after = “0s”
The maximum number of points a SELECT can process. A value of 0 will make
the maximum point count unlimited. This will only be checked every second so queries will not
be aborted immediately when hitting the limit.
一次查询返回的最大point数,即数据的条数。0无限制
这只是每秒钟检查,所以某一秒到达point最大值,不会影响后面的查询
max-select-point = 0
The maximum number of series a SELECT can run. A value of 0 will make the maximum series
count unlimited.
一次查询返回的series的最大值,0无限制
max-select-series = 0
The maximum number of group by time bucket a SELECT can create. A value of zero will max the maximum
number of buckets unlimited.
一次查询按时间排序最大组数,0无限制。
max-select-buckets = 0
[retention]
Controls the enforcement of retention policies for evicting old data.
控制删除旧数据的保留策略的执行设置。
[retention]
Determines whether retention policy enforcement enabled.
是否开启保留策略,默认开启
enabled = true
The interval of time when retention policy enforcement checks run.
保留策略强制检查运行的时间间隔,默认30分钟检查一下shard group,并以shard group为单位清除数据
check-interval = “30m”
[shard-precreation]
shard预创建配置
Controls the precreation of shards, so they are available before data arrives.
Only shards that, after creation, will have both a start- and end-time in the
future, will ever be created. Shards are never precreated that would be wholly
or partially in the past.
[shard-precreation]
Determines whether shard pre-creation service is enabled.
是否开启shard预创建服务,默认开启,为了数据写入时shard已经准备好可用。
enabled = true
The interval of time when the check to pre-create new shards runs.
预创建新shard的检查运行时间间隔
check-interval = “10m”
The default period ahead of the endtime of a shard group that its successor
group is created.
一个shard group在结束写之前多久,后继group被创建。也是下一个group的预创建时间
默认30分钟前
advance-period = “30m”
Controls the system self-monitoring, statistics and diagnostics.
控制系统的自我监视、统计和诊断。
The internal database for monitoring data is created automatically if
if it does not already exist. The target retention within this database
is called ‘monitor’ and is also created with a retention period of 7 days
and a replication factor of 1, if it does not exist. In all cases the
this retention policy is configured as the default for the database.
用于监控数据的内部数据库如果它不存在将自动创建。此数据库中的目标保留策略名为“monitor”,如果不存在,则创建的保留期为7天,复制因子为1的保留策略。
在所有情况下这个保留策略被配置为该数据库的默认策略。
[monitor]
Whether to record statistics internally.
是否在内部记录统计数据,默认记录。
store-enabled = true
The destination database for recorded statistics
用于记录统计数据的目标数据库,_internal
store-database = “_internal”
The interval at which to record statistics
多久记录一次统计数据,默认10秒。
store-interval = “10s”
[http]
Controls how the HTTP endpoints are configured. These are the primary
mechanism for getting data into and out of InfluxDB.
控制如何配置HTTP端点。这些是用于输入和输出数据的主要原理。
[http]
Determines whether HTTP endpoint is enabled.
是否开启http端点,默认开启,为了通过http操作数据库
enabled = true
Determines whether the Flux query endpoint is enabled.
确认是否启用Flux query
flux-enabled = false
Determines whether the Flux query logging is enabled.
确认是否开启Flux query日志
flux-log-enabled = false
The bind address used by the HTTP service.
http服务绑定的地址端口 ,默认8086,如果冲突可更换
bind-address = “:8086”
Determines whether user authentication is enabled over HTTP/HTTPS.
确定是否通过HTTP/HTTPS启用用户身份验证。
auth-enabled = true
The default realm sent back when issuing a basic auth challenge.
发出基本认证质询时返回的默认域。
realm = “InfluxDB”
Determines whether HTTP request logging is enabled.
确认是否启动http请求日志
log-enabled = true
Determines whether the HTTP write request logs should be suppressed when the log is enabled.
确定在启用日志时是否应该抑制HTTP写请求日志。,默认false,即会记录写日志
suppress-write-log = false
When HTTP request logging is enabled, this option specifies the path where
log entries should be written. If unspecified, the default is to write to stderr, which
intermingles HTTP logs with internal InfluxDB logging.
当启用HTTP请求日志记录时,此选项指定路径应该写入日志条目。
如果未指定,默认是写入stderr,它混合HTTP日志和内部的影响db日志。
If influxd is unable to access the specified path, it will log an error and fall back to writing
the request log to stderr.
如果没有指定日志路径,将记录一个异常并转而写入stderr(标准错误输出)
access-log-path = “”
Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is
a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.
If multiple filters are used, then only one has to match. The default is to have no filters which
will cause every request to be printed.
过滤器配置 有3种模式NNN,NNX or NXX.N 代表一个数字,x是任何数字的统配符。如果想过滤所有5xx返回,可使用5xx
如果使用多个过滤器,只有其中一个被匹配到。默认没有配置过滤器,即将输出每一个的请求返回日志
access-log-status-filters = []
Determines whether detailed write logging is enabled.
确认是否启用详细写日志
write-tracing = false
Determines whether the pprof endpoint is enabled. This endpoint is used for
troubleshooting and monitoring.
确定是否启用pprof端点。此端点用于故障排除和监控。
pprof-enabled = true
Enables authentication on pprof endpoints. Users will need admin permissions
to access the pprof endpoints when this setting is enabled. This setting has
no effect if either auth-enabled or pprof-enabled are set to false.
在pprof端点上启用身份验证。用户将需要管理权限以在启用此设置时访问pprof端点。
这个设置如果auth启用,设置为false,则无效。
pprof-auth-enabled = false
Enables a pprof endpoint that binds to localhost:6060 immediately on startup.
This is only needed to debug startup issues.
启用在启动时立即绑定到本地主机6060的pprof端点。这只需要调试启动问题。
debug-pprof-enabled = false
Enables authentication on the /ping, /metrics, and deprecated /status
endpoints. This setting has no effect if auth-enabled is set to false.
在/ping,/metrics,deprecated,status端点上启用权限验证,默认不启用。
ping-auth-enabled = false
Determines whether HTTPS is enabled.
确认是否启用https
https-enabled = false
The SSL certificate to use when HTTPS is enabled.
启用HTTPS时要使用的SSL证书。
https-certificate = “/etc/ssl/influxdb.pem”
Use a separate private key location.
使用单独的私钥位置。
https-private-key = “”
The JWT auth shared secret to validate requests using JSON web tokens.
JWT认证共享秘密,使用JSON web令牌验证请求。
shared-secret = “”
The default chunk size for result sets that should be chunked.
应该被分块的结果集,默认chunk的大小
max-row-limit = 0
The maximum number of HTTP connections that may be open at once. New connections that
would exceed this limit are dropped. Setting this value to 0 disables the limit.
一次可以打开的最大HTTP连接数。超过此限制的新连接将被删除。将此值设置为0将禁用此限制。
max-connection-limit = 0
Enable http service over unix domain socket
通过unix域套接字启用http服务
unix-socket-enabled = false
The path of the unix domain socket.
unix域套接字的路径。
bind-socket = “/var/run/influxdb.sock”
The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.
客户端请求主体的最大大小,以字节为单位。将此值设置为0将禁用此限制。默认23m左右
max-body-size = 25000000
The maximum number of writes processed concurrently.
Setting this to 0 disables the limit.
并发处理的最大写操作数。将此设置为0将禁用此限制。
max-concurrent-write-limit = 0
The maximum number of writes queued for processing.
Setting this to 0 disables the limit.
排队等待处理的最大写操作数。将此设置为0将禁用此限制。
max-enqueued-write-limit = 0
The maximum duration for a write to wait in the queue to be processed.
Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit.
写操作在要处理的队列中等待的最大持续时间。将此设置为0或将max-enqueued-write-limit设置为0将禁用该限制。
enqueued-write-timeout = 0
[logging]
Controls how the logger emits logs to the output.
控制日志记录器如何将日志发送到控制台
[logging]
Determines which log encoder to use for logs. Available options
are auto, logfmt, and json. auto will use a more a more user-friendly
output format if the output terminal is a TTY, but the format is not as
easily machine-readable. When the output is a non-TTY, auto will use
logfmt.
是使用自动编码
format = “auto”
Determines which level of logs will be emitted. The available levels
are error, warn, info, and debug. Logs that are equal to or above the
specified level will be emitted.
日志级别 info,错误、警告、信息和调试都会打印
level = “info”
Suppresses the logo output that is printed when the program is started.
The logo is always suppressed if STDOUT is not a TTY.
抑制程序启动时打印的徽标输出。如果STDOUT不是TTY,徽标总是被抑制的。
最后
e format is not as
easily machine-readable. When the output is a non-TTY, auto will use
logfmt.
是使用自动编码
format = “auto”
Determines which level of logs will be emitted. The available levels
are error, warn, info, and debug. Logs that are equal to or above the
specified level will be emitted.
日志级别 info,错误、警告、信息和调试都会打印
level = “info”
Suppresses the logo output that is printed when the program is started.
The logo is always suppressed if STDOUT is not a TTY.
抑制程序启动时打印的徽标输出。如果STDOUT不是TTY,徽标总是被抑制的。
最后
[外链图片转存中…(img-5rreopfK-1714300833222)]
[外链图片转存中…(img-BdJbdKc4-1714300833223)]
[外链图片转存中…(img-upKMOWAj-1714300833223)]