A Go replacement for the Shell script that was provided to check health of a PXC node. This is designed to replace the HAProxy check use case, and not the shell return value use case.
Differences:
- No more dependency on mysql shell client, doesn't require re-write to handle XtraDB in a container.
- No more dependency on xinetd.
GRANT PROCESS ON *.* TO 'clustercheckuser'@'127.0.0.1' IDENTIFIED BY 'clustercheckpassword!'
$ make build
$ make build-container
$ make run
$ docker run -p 9200:9200 xtradb-proxy-check:0.0.1-alpha
# Overriding environment variables:
$ docker run --env CLUSTERCHECK_MYSQL_USERNAME='clustercheckuser2' \
--env CLUSTERCHECK_MYSQL_PASSWORD='clustercheckpassword2!' \
-p 9200:9200 xtradb-proxy-check:0.0.1-alpha
export CLUSTERCHECK_MYSQL_USERNAME='clustercheckuser'
export CLUSTERCHECK_MYSQL_PASSWORD='clustercheckpassword!'
export CLUSTERCHECK_MYSQL_HOSTNAME='127.0.0.1'
export CLUSTERCHECK_MYSQL_PORT=3306
export CLUSTERCHECK_API_PORT=9200
export CLUSTERCHECK_AVAILABLE_WHEN_DONOR=true
export CLUSTERCHECK_AVAILABLE_WHEN_READ_ONLY=false
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.