Influxdb 配置⽂件详解---f
全局配置1
21、meta 相关配置1
2
3
42、data 相关配置1
2
3
4
5
6
7
8
9
103、coordinator 查询管理的配置选项1
2
3
4
5
6
7
84、retention 旧数据的保留策略1
2
35、shard-precreation 分区预创建1
2
3
46、monitor 控制InfluxDB ⾃有的监控系统。 默认情况下,InfluxDB 把这些数据写⼊_internal 数据库,如果这个库不存在则⾃动创建。 _internal 库默认的retention 策略是7天,如果你想使⽤⼀个⾃⼰的retention 策略,需要⾃⼰创建。1
2
3
47、admin web 管理页⾯1
2
3
4
58、http API 1
2
3
4
5
6
7
conf8
9
10
11
12
13
14
15
169、subscriber 控制Kapacitor 接受数据的配置1
2
3
4
5
6
710、graphite 相关配置1
2reporting -disabled = false # 该选项⽤于上报influxdb 的使⽤信息给InfluxData 公司,默认值为false bind -address = ":8088" # 备份恢复时使⽤,默认值为8088
[meta]dir = "/var/lib/influxdb/meta" # meta 数据存放⽬录retention -autocreate = true # ⽤于控制默认存储策略,数据库创建时,会⾃动⽣成autogen 的存储策略,默认值:true logging -enabled = true # 是否开启meta ⽇志,默认值:true
[data]dir = "/var/lib/influxdb/data" # 最终数据(TSM ⽂件)存储⽬录wal -dir = "/var/lib/influxdb/wal" # 预写⽇志存储⽬录query -log -enabled = true # 是否开启tsm 引擎查询⽇志,默认值: true cache -max -memory -size = 1048576000 # ⽤于限定shard 最⼤值,⼤于该值时会拒绝写⼊,默认值:1000MB ,单位:byte cache -snapshot -memory -size = 26214400 # ⽤于设置快照⼤⼩,⼤于该值时数据会刷新到tsm ⽂件,默认值:25MB ,单位:byte cache -snapshot -write -cold -duration = "10m" # tsm 引擎 snapshot 写盘延迟,默认值:10Minute compact -full -write -cold -duration = "4h" # tsm ⽂件在压缩前可以存储的最⼤时间,默认值:4Hour max -series -per -database = 1000000 # 限制数据库的级数,该值为0时取消限制,默认值:1000000max -values -per -tag = 100000 # ⼀个tag 最⼤的value 数,0取消限制,默认值:100000
[coordinator]write -timeout = "10s" # 写操作超时时间,默认值: 10s max -concurrent -queries = 0 # 最⼤并发查询数,0⽆限制,默认值: 0query -timeout = "0s # 查询操作超时时间,0⽆限制,默认值:0s log -queries -after = "0s" # 慢查询超时时间,0⽆限制,默认值:0s max -select -point = 0 # SELECT 语句可以处理的最⼤点数(points ),0⽆限制,默认值:0max -select -series = 0 # SELECT 语句可以处理的最⼤级数(series ),0⽆限制,默认值:0max -select -buckets = 0 # SELECT 语句可以处理的最⼤"GROUP BY time()"的时间周期,0⽆限制,默认值:0
[retention]enabled = true # 是否启⽤该模块,默认值 : true check -interval = "30m" # 检查时间间隔,默认值 :"30m"
[shard -precreation]enabled = true # 是否启⽤该模块,默认值 : true check -interval = "10m" # 检查时间间隔,默认值 :"10m"advance -period = "30m" # 预创建分区的最⼤提前时间,默认值 :"30m"
[monitor]store -enabled = true # 是否启⽤该模块,默认值 :true store -database = "_internal" # 默认数据库:"_internal"store -interval = "10s # 统计间隔,默认值:"10s "
[admin]enabled = true # 是否启⽤该模块,默认值 : false bind -address = ":8083" # 绑定地址,默认值 :":8083"https -enabled = false # 是否开启https ,默认值 :false https -certificate = "/etc/ssl/influxdb.pem" # https 证书路径,默认值:"/etc/ssl/influxdb.pem"
[http]enabled = true # 是否启⽤该模块,默认值 :true bind -address = ":8086" # 绑定地址,默认值:":8086"auth -enabled = false # 是否开启认证,默认值:false realm = "InfluxDB" # 配置JWT realm ,默认值: "InfluxDB"log -enabled = true # 是否开启⽇志,默认值:true write -tracing = false # 是否开启写操作⽇志,如果置成true ,每⼀次写操作都会打⽇志,默认值:false pprof -enabled = true # 是否开启pprof ,默认值:true https -enabled = false # 是否开启https ,默认值:false https -certificate = "/etc/ssl/influxdb.pem" # 设置https 证书路径,默认值:"/etc/ssl/influxdb.pem"https -private -key = "" # 设置https 私钥,⽆默认值shared -secret = "" # ⽤于JWT 签名的共享密钥,⽆默认值max -row -limit = 0 # 配置查询返回最⼤⾏数,0⽆限制,默认值:0max -connection -limit = 0 # 配置最⼤连接数,0⽆限制,默认值:0unix -socket -enabled = false # 是否使⽤unix-socket ,默认值:false bind -socket = "/var/run/influxdb.sock" # unix-socket 路径,默认值:"/var/run/influxdb.sock"
[subscriber]enabled = true # 是否启⽤该模块,默认值 :true http -timeout = "30s" # http 超时时间,默认值:"30s"insecure -skip -verify = false # 是否允许不安全的证书ca -certs = "" # 设置CA 证书write -concurrency = 40 # 设置并发数⽬,默认值:40write -buffer -size = 1000 # 设置buffer ⼤⼩,默认值:1000
[[graphite]]enabled = false # 是否启⽤该模块,默认值 :false
2
3
4
5
6
7
8
9
10
11
1211、collectd 1
2
3
4
5
6
7
8
9
10
1112、opentsdb 1
2
3
4
5
6
7
8
9
10
11
1213、udp 1
2
3
4
5
6
7
8
914、continuous_queries 1
2
3
4enabled = false # 是否启⽤该模块,默认值 :false database = "graphite" # 数据库名称,默认值:"graphite"retention -policy = "" # 存储策略,⽆默认值bind -address = ":2003" # 绑定地址,默认值:":2003"protocol = "tcp" # 协议,默认值:"tcp"consistency -level = "one" # ⼀致性级别,默认值:"one batch -size = 5000 # 批量size ,默认值:5000batch -pending = 10 # 配置在内存中等待的b
atch 数,默认值:10batch -timeout = "1s" # 超时时间,默认值:"1s"udp -read -buffer = 0 # udp 读取buffer 的⼤⼩,0表⽰使⽤操作系统提供的值,如果超过操作系统的默认配置则会出错。 该配置的默认值:0separator = "." # 多个measurement 间的连接符,默认值: "."
[[collectd]]enabled = false # 是否启⽤该模块,默认值 :false bind -address = ":25826" # 绑定地址,默认值: ":25826"database = "collectd" # 数据库名称,默认值:"collectd"retention -policy = "" # 存储策略,⽆默认值typesdb = "/usr/local/share/collectd" # 路径,默认值:"/usr/share/collectd/types.db"auth -file = "/etc/collectd/auth_file"batch -size = 5000batch -pending = 10batch -timeout = "10s"read -buffer = 0 # udp 读取buffer 的⼤⼩,0表⽰使⽤操作系统提供的值,如果超过操作系统的默认配置则会出错。默认值:0
[[opentsdb]]enabled = false # 是否启⽤该模块,默认值:false bind -address = ":4242" # 绑定地址,默认值:":4242"database = "opentsdb" # 默认数据库:"opentsdb"retention -policy = "" # 存储策略,⽆默认值consistency -level = "one" # ⼀致性级别,默认值:"one"tls -enabled = false # 是否开启tls ,默认值:false certificate = "/etc/ssl/influxdb.pem" # 证书路径,默认值:"/etc/ssl/influxdb.pem"log -point -errors = true # 出错时是否记录⽇志,默认值:true batch -size = 1000batch -pending = 5batch -timeout = "1s"
[[udp]]enabled = false # 是否启⽤该模块,默认值:false bind -address = ":8089" # 绑定地址,默认值:":8089"database = "udp" # 数据库名称,默认值:"udp"retention -policy = "" # 存储策略,⽆默认值batch -size = 5000batch -pending = 10batch -timeout = "1s"read -buffer = 0 # udp 读取buffer 的⼤⼩,0表⽰使⽤操作系统提供的值,如果超过操作系统的默认配置则会出错。 该配置的默认值:0
[continuous_queries]enabled = true # enabled 是否开启CQs ,默认值:true log -enabled = true # 是否开启⽇志,默认值:true run -interval = "1s" # 时间间隔,默认值:"1s"
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论