InfluxDB-HA Installation Guide

Influx-proxy HA install guide

img

Reading instructions

install influx-proxy

1. Close SELinux

sed -i 's/enforcing/disabled/' /etc/selinux/config
setenforce 0
reboot

2. Install the influx-proxy

dnf install -y influx-proxy

3. Modify /etc/influx-proxy/influx-proxy.toml, change the url and token of the influxdb to their real values

4. Start the influx-proxy service

systemctl enable influx-proxy.service
systemctl start influx-proxy.service

5. Check the status of the influx-proxy service

systemctl status influx-proxy.service

Install keepalived

1. Install keepalived service on both the master and backup nodes

dnf install -y keepalived

2. Edit the /etc/keepalived/keepalived.conf file on the master node add the following content

Note: specify interface as the one used by the hostname IP address, and specify virtual_ipaddress as an unused IP address that must be in the same network as the hostname IP address.

vrrp_script check_influx-proxy {
  script "</dev/tcp/127.0.0.1/7076"
  interval 5
   weight -2
}
vrrp_instance VI_INFLUX_PROXY {
  state MASTER
  interface <INTERFACE >
  virtual_router_id 63
  priority 100
  advert_int 1
  virtual_ipaddress {
    <VIRTUAL_IP>
  }
  track_script {
    check_influx-proxy
  }
}

3. Edit the /etc/keepalived/keepalived.conf file on the backup node add the following content

Note: specify interface as the one used by the hostname IP address, and specify virtual_ipaddress as an unused IP address that must be in the same network as the hostname IP address and ensure it is consistent with the master configuration

vrrp_script check_influx-proxy {
  script "</dev/tcp/127.0.0.1/7076"
  interval 5
  weight -2
}
vrrp_instance VI_INFLUX_PROXY {
  state BACKUP
  interface <INTERFACE >
  virtual_router_id 63
  priority 99
  advert_int 1
  virtual_ipaddress {
    <VIRTUAL_IP>
  }
  track_script {
    check_influx-proxy
  }
}

4. Start the keepalived service on the master and backup

systemctl enable keepalived
systemctl start keepalived
systemctl status keepalived