pgsqlchecker to be used with postgresql-repmgr
243
flask version of xinetd for pgsqlcheck
# set environment variable
nano .env
POSTGRESQL_HOST=
POSTGRESQL_DB=
POSTGRESQL_USER=
POSTGRESQL_PASS=
POSTGRESQL_PORT=
# run docker image
docker run -dti --name flask-pgsqlcheck -p 25432:25432 flask-pgsqlcheck
# test hit
curl http://localhost:25432/
# sample output:
Primary (http code: 200)
Standby (http code: 206)
DBDown (http code: 503)
...
frontend db-primary
bind *:5432
default_backend db-backend-primary
frontend db-standby
bind *:5433
default_backend db-backend-standby
backend db-backend-primary
option httpchk GET / HTTP/1.1
http-check expect status 200
server db-01 1.2.3.4:5432 check port 25432
server db-02 1.2.3.4:5432 check port 25432
backend db-backend-standby
option httpchk GET / HTTP/1.1
http-check expect status 206
server db-01 1.2.3.4:5432 check port 25432
server db-02 1.2.3.4:5432 check port 25432
Content type
Image
Digest
sha256:d274b7745…
Size
63.9 MB
Last updated
over 2 years ago
docker pull artemtech/flask-pgsqlcheck