influxdb-配置文件说明

本文详细解析InfluxDB的配置文件,涵盖各项设置参数及其作用,帮助用户更好地理解和配置InfluxDB服务器,提升数据存储与查询效率。
摘要由CSDN通过智能技术生成
### Welcome to the InfluxDB configuration file.
# influxdb默认的配置项,如果需要修改则去掉#号,修改后重启即可生效
# The values in this file override the default values used by the system if
# a config option is not specified. The commented out lines are the configuration
# field and the default value used. Uncommenting a line and changing the value
# will change the value used at runtime when the process is restarted.
# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
# The data includes a random ID, os, arch, version, the number of series and other
# usage data. No data from user databases is ever transmitted.
# Change this option to true to disable reporting.
# reporting-disabled = false
# 设置用户备份与修复(数据)的RPC服务地址
# Bind address to use for the RPC service for backup and restore.
# bind-address = "127.0.0.1:8088"
###
### [meta]
### 存储有关InfluxDB集群元数据的 Raft consensus group 的控制参数将在下面被配置。
### Controls the parameters for the Raft consensus group that stores metadata
### about the InfluxDB cluster.
###
[meta]
# Where the metadata/raft database is stored
# 元数据/raft 数据库被存储的路径 即meta目录
dir = "/var/lib/influxdb/meta"
# Automatically create a default retention policy when creating a database.
# 当创建一个新的数据库时自动为其创建一个默认的rentention policy(保留策略)
# retention-autocreate = true
# If log messages are printed for the meta service
# 是否为meta服务打印日志
# logging-enabled = true
###
### [data]
### 修改InfluxDB的分片数据的具体存放路径,以及这部分数据从WAL(Write Ahead Log)刷新的(策略)
### 根据系统实际情况配置dir路径
### Controls where the actual shard data for InfluxDB lives and how it is
### flushed from the WAL. "dir" may need to be changed to a suitable place
### for your system, but the WAL settings are an advanced configuration. The
### defaults should work for most systems.
###
[data]
# The directory where the TSM storage engine stores TSM files.
# TSM存储引擎存储TSM文件的目录
dir = "/var/lib/influxdb/data"
# The directory where the TSM storage engine stores WAL files.
# TSM存储引擎存储WAL文件的目录
wal-dir = "/var/lib/influxdb/wal"
# The amount of time that a write will wait before fsyncing. A duration
# greater than 0 can be used to batch up multiple fsync calls. This is useful for slower
# disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL.
# Values in the range of 0-100ms are recommended for non-SSD disks.
# 这个时间参数是在fsyncing之前一个写入操作将等待的时间。
# fsync解释为:帧同步脉冲 操作 被同步 把文件在内存中的部分写回磁盘
# 大于0的参数可以用来整理多重fsync操作。当系统磁盘读写速度较慢或出现WAL写入延缓时,可以考虑配置该参数
# 对于非固态硬盘,这个参数推荐的配置范围是0~100毫秒
# wal-fsync-delay = "0s"

# The type of shard index to use for new shards. The default is an in-memory index that is
# recreated at startup. A value of "tsi1" will use a disk based index that supports higher
# cardinality datasets.
# 对于influxdb新产生的分片索引的类型将在这里被设置。初始默认的索引类型是一种 in-memory 索引,如果你修改成
# tsi1 将会对于高基数数据支持的更好。
#(high-cardinality 是描述tag rentention-policy measurement组合成series规模的度量值)
# 修改该参数可以解决内存不足使用磁盘替换
# index-version = "inmem"
# Trace logging provides more verbose output around the tsm engine. Turning
# this on can provide more useful output for debugging tsm engine issues.
# 打印追踪日志,也就是打印debug日志。如果打开的话会创建大量冗长的、有关tsm存储引擎工作细节的日志。
# trace-logging-enabled = false
# Whether queries should be logged before execution. Very useful for troubleshooting, but will
# log any sensitive data contained within a query.
# 这个配置决定在执行query查询动作前是否记录为日志。对于解决问题很有帮助
# 但是会把所有含有query的敏感数据都记录下来
# query-log-enabled = true
# Validates incoming writes to ensure keys only have valid unicode characters.
# This setting will incur a small overhead because every key must be checked.
# validate-keys = false
# Settings for the TSM engine(有关TSM存储引擎的设置)
# CacheMaxMemorySize is the maximum size a shard's cache can
# reach before it starts rejecting writes.
# Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
# Values without a size suffix are in bytes.
# 一个分片在拒接写入之前的最大容量(换言之就是一个分片的最大容量)
# 这里的体积单位可以是 k m 或者g 并且不区分大小写,如果不写单位就表示byte
# cache-max-memory-size = "1g"
# CacheSnapshotMemorySize is the size at which the engine will
# snapshot the cache and write it to a TSM file, freeing up memory
# Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
# Values without a size suffix are in bytes.
# 引擎向TSM文件写入时,快照缓存数据的大小,单位参考cache-max-memory-size
# cache-snapshot-memory-size = "25m"
# CacheSnapshotWriteColdDuration is the length of time at
# which the engine will snapshot the cache and write it to
# a new TSM file if the shard hasn't received writes or deletes
# 如果分片(shard)没有接收到写入或删除(请求),引擎向TSM文件写入时候产生的快照缓存文件的时间
# cache-snapshot-write-cold-duration = "10m"
# CompactFullWriteColdDuration is the duratio
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值