Update comment and README.md file

This commit is contained in:
Benjamin Renard 2020-11-04 19:19:22 +01:00
parent 0443f56b1d
commit d33476ce8d
2 changed files with 26 additions and 21 deletions

View file

@ -29,32 +29,37 @@ This script :
Requirements Requirements
------------ ------------
* **On master node :** 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`). * Some CLI tools: `sudo`, `awk`, `sed`, `bc`, `psql` and `pg_lscluster`
* **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`). * **On master node:** Slaves must be able to connect with user from `recovery.conf` (or user specify using `-U`) to database with the same name (or another specified with `-D`) as `trust` (or via `md5` using password specified in `~/.pgpass`). This user must have `SUPERUSER` privilege (need to get replication details).
* `sudo` must be install on each nodes. * **On standby node:** `PG_USER` must be able to connect localy on the database with the same name `(or another specified with -D)` as `trust` (or via `md5` using password specified in `~/.pgpass`).
Usage Usage
----- -----
```
Usage: check_pg_streaming_replication [-d] [-h] [options] Usage: check_pg_streaming_replication [-d] [-h] [options]
-u pg_user Specify Postgres user (Default : postgres) -u pg_user Specify local Postgres user (Default: try to auto-detect or use postgres)
-b psql_bin Specify psql binary path (Default: /usr/bin/psql) -b psql_bin Specify psql binary path (Default: /usr/bin/psql)
-m pg_main Specify Postgres main directory path -B pg_lsclusters_bin Specify pg_lsclusters binary path (Default: /usr/bin/pg_lsclusters)
(By default, try to auto-detect it, on your system it : -V pg_version Specify Postgres version (Default: try to auto-detect or use 9.1)
/var/lib/postgresql/9.6/main) -m pg_main Specify Postgres main directory path (Default: try to auto-detect or use
/var/lib/postgresql//main)
-r recovery_conf Specify Postgres recovery configuration file path -r recovery_conf Specify Postgres recovery configuration file path
(Default: [PG_MAIN]/recovery.conf) (Default: [PG_MAIN]/recovery.conf)
-U pg_master_user Specify Postgres user to use on master (Default: user from recovery.conf file) -U pg_master_user Specify Postgres user to use on master (Default: user from recovery.conf file)
-p pg_port Specify default Postgres master TCP port (Default : 5432) -p pg_port Specify default Postgres master TCP port (Default: same as local PostgreSQL
-D dbname Specify DB name on Postgres master/slave to connect on (Default : PG_USER) port if detected or use 5432)
-C 1/0 Enable or disable check if the current XLOG file of the master host is the same -D dbname Specify DB name on Postgres master/slave to connect on (Default: PG_USER, must
of the last replay XLOG file (Default : 1) match with .pgpass one is used)
-C 1/0 Enable or disable check if the current LSN of the master host is the same
of the last received LSN (Default: 1)
-w replay_warn_delay Specify the replay warning delay in second (Default: 3) -w replay_warn_delay Specify the replay warning delay in second (Default: 3)
-c replay_crit_delay Specify the replay critical delay in second (Default: 5) -c replay_crit_delay Specify the replay critical delay in second (Default: 5)
-d Debug mode -d Debug mode
-h Show this message -h Show this message
```
Copyright Copyright
--------- ---------

View file

@ -6,7 +6,7 @@
# #
# Requirements: # Requirements:
# #
# Some CLI tools: awk, sed, bc, psql and pg_lscluster # Some CLI tools: sudo, awk, sed, bc, psql and pg_lscluster
# #
# On master node: Slaves must be able to connect with user from recovery.conf # On master node: Slaves must be able to connect with user from recovery.conf
# (or user specify using -U) to database with the same name # (or user specify using -U) to database with the same name