Improve help message and docs
This commit is contained in:
parent
3966aac8c1
commit
4efda74bf6
2 changed files with 21 additions and 12 deletions
20
README
20
README
|
@ -15,7 +15,8 @@ This script :
|
||||||
- retreive master connection informations from Postgres recovery configuration
|
- retreive master connection informations from Postgres recovery configuration
|
||||||
file (UNKNOWN raise on error). Default Postgres master TCP port will be used
|
file (UNKNOWN raise on error). Default Postgres master TCP port will be used
|
||||||
if port is not specify.
|
if port is not specify.
|
||||||
- retreive current xlog file from Postgres master server (UNKNOWN raise on error).
|
- retreive current xlog file from Postgres master server by making a connection
|
||||||
|
on master server (UNKNOWN raise on error).
|
||||||
- check if the last receive xlog file is the last replay xlog file (WARNING raise if not)
|
- check if the last receive xlog file is the last replay xlog file (WARNING raise if not)
|
||||||
- Return OK state
|
- Return OK state
|
||||||
- if Postgres is not in recovery mode :
|
- if Postgres is not in recovery mode :
|
||||||
|
@ -23,20 +24,24 @@ This script :
|
||||||
- check if stand-by client(s) is connected (WARNING raise if not)
|
- check if stand-by client(s) is connected (WARNING raise if not)
|
||||||
- Return OK state with list and count of stand-by client(s)
|
- Return OK state with list and count of stand-by client(s)
|
||||||
|
|
||||||
Note : This script was originally write and test for PostgreSQL 9.1, but it could be compatible
|
Note : This script was originally write for PostgreSQL 9.1 and test on 9.1 and 9.5 but it
|
||||||
with other versions of PostgreSQL. Do not hesitate to tell me how this script work with other
|
could be compatible with other versions of PostgreSQL. Do not hesitate to tell me how this
|
||||||
versions and share some fix. All contributions are welcome !
|
script work with other versions and share some fix. All contributions are welcome !
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* On master node :
|
* On master node :
|
||||||
|
|
||||||
Slaves node must be able to connect with user PG_USER to database postgres as trust.
|
Slaves must be able to connect with user from recovery.conf to database with
|
||||||
|
the same name (or another specify with -D) as trust (or via md5 using password
|
||||||
|
specify in ~/.pgpass).
|
||||||
|
|
||||||
* On standby node :
|
* On standby node :
|
||||||
|
|
||||||
PG_USER must be able to connect localy as trust
|
PG_USER must be able to connect localy on the database with the same name
|
||||||
|
(or another specify with -D) as trust (or via md5 using password specify in
|
||||||
|
~/.pgpass).
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
@ -49,13 +54,14 @@ Usage
|
||||||
-r recovery_conf Specify Postgres recovery configuration file path
|
-r recovery_conf Specify Postgres recovery configuration file path
|
||||||
(Default : /var/lib/postgresql/9.1/main/recovery.conf)
|
(Default : /var/lib/postgresql/9.1/main/recovery.conf)
|
||||||
-p pg_port Specify default Postgres master TCP port (Default : 5432)
|
-p pg_port Specify default Postgres master TCP port (Default : 5432)
|
||||||
|
-D dbname Specify DB name on Postgres hosts to connect on (Default : postgres)
|
||||||
-d Debug mode
|
-d Debug mode
|
||||||
-h Show this message
|
-h Show this message
|
||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Copyright (c) 2013 Benjamin Renard
|
Copyright (c) 2017 Benjamin Renard
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -6,13 +6,16 @@
|
||||||
#
|
#
|
||||||
# Requirement :
|
# Requirement :
|
||||||
#
|
#
|
||||||
# On master node : Slaves must be able to connect with user PG_USER
|
# On master node : Slaves must be able to connect with user from recovery.conf
|
||||||
# to database postgres as trust
|
# to database with the same name (or another specify with -D)
|
||||||
|
# as trust (or via md5 using password specify in ~/.pgpass).
|
||||||
#
|
#
|
||||||
# On standby node : PG_USER must be able to connect localy as trust
|
# On standby node : PG_USER must be able to connect localy on the database
|
||||||
|
# with the same name (or another specify with -D) as trust
|
||||||
|
# (or via md5 using password specify in ~/.pgpass).
|
||||||
#
|
#
|
||||||
# Author : Benjamin Renard <brenard@easter-eggs.com>
|
# Author : Benjamin Renard <brenard@easter-eggs.com>
|
||||||
# Date : Wed, 14 Mar 2012 14:45:55 +0000
|
# Date : Fri, 25 Aug 2017 15:57:57 +0200
|
||||||
# Source : http://git.zionetrix.net/check_pg_streaming_replication
|
# Source : http://git.zionetrix.net/check_pg_streaming_replication
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -44,7 +47,7 @@ Usage : $0 [-d] [-h] [options]
|
||||||
(By default, try to auto-detect it, on your system it :
|
(By default, try to auto-detect it, on your system it :
|
||||||
$PG_MAIN)
|
$PG_MAIN)
|
||||||
-r recovery_conf Specify Postgres recovery configuration file path
|
-r recovery_conf Specify Postgres recovery configuration file path
|
||||||
(Default : $PG_MAIN/$RECOVERY_CONF_FILENAME)
|
(Default : [PG_MAIN]/$RECOVERY_CONF_FILENAME)
|
||||||
-p pg_port Specify default Postgres master TCP port (Default : $PG_DEFAULT_PORT)
|
-p pg_port Specify default Postgres master TCP port (Default : $PG_DEFAULT_PORT)
|
||||||
-D dbname Specify DB name on Postgres master/slave to connect on (Default : PG_USER)
|
-D dbname Specify DB name on Postgres master/slave to connect on (Default : PG_USER)
|
||||||
-d Debug mode
|
-d Debug mode
|
||||||
|
|
Loading…
Reference in a new issue