logo

Settings

Edit $HOME_HAPROXY-WI/app/haproxy-wi.cfg with your env

For Runtime API, Metrics and Alerting enable state file and stat socket on HAProxy servers and need install socat on all haproxy servers, and configre HAProxy:
global
	stats socket *:1999 level admin 
    stats socket /var/run/haproxy.sock mode 600 level admin
    server-state-file /etc/haproxy/haproxy.state

defaults
	load-server-state-from-file global

listen stats 
	stats admin if TRUE 
		

DB settings


Default HAProxy-WI uses Sqlite, if you want use MySQL enable in config:

  • [mysql]
  • #Enable MySQL DB. Default will be used Sqlite DB. Default disable
  • enable = 1
  • mysql_user = haproxywi
  • mysql_password = haproxy-wi
  • mysql_db = haproxywi
  • mysql_host = 127.0.0.1


And create database:

  • MariaDB [(none)]> create user 'haproxy-wi'@'%';
  • MariaDB [(none)]> create database haproxywi;
  • MariaDB [(none)]> grant all on haproxywi.* to 'haproxy-wi'@'%' IDENTIFIED BY 'haproxy-wi';
  • MariaDB [(none)]> grant all on haproxywi.* to 'haproxy-wi'@'localhost' IDENTIFIED BY 'haproxy-wi';