influxDB v0.11 集群配置

1.首先下载安装0.11版本之前的influxdb

wget https://repos.influxdata.com/rhel/7/amd64/stable/influxdb-0.11.1-1.x86_64.rpm

yum localinstall influxdb-0.11.1-1.x86_64.rpm

2.对influxdb.conf进行配置


reporting-disabled = true
join = ":8091,:8091,..."
[meta]
  enabled = true
  ...
  bind-address = ":8088"
  ...
  http-bind-address = ":8091"

...

[data]
  enabled = true

...

[http]
  ...
  bind-address = ":8086"

如果启动关联collectd,需加上

[[collectd]]
enabled = true
bind-address = ":25826"
database = "collectdb"
typesdb = "/usr/share/collectd/types.db"
batch-size = 5000
batch-pending = 10
batch-timeout = "10s"
read-buffer = 0

collectd这边则需要开启network插件作为server端

LoadPlugin network
"network">
Server "" "25826"

重启influxdb服务和colletd服务

3查看influx集群信息
进入influx命令行执行show servers


> show SERVERS
name: data_nodes
----------------
id  http_addr   tcp_addr
1   vm1:8086    vm1:8088
2   vm2:8086    vm2:8088


name: meta_nodes
----------------
id  http_addr   tcp_addr
1   vm1:8091    vm1:8088
2   vm2:8091    vm2:8088

在其他结点上查看数据已同步则OK

你可能感兴趣的:(linux)