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] ```
-u pg_user Specify Postgres user (Default : postgres) Usage: check_pg_streaming_replication [-d] [-h] [options]
-b psql_bin Specify psql binary path (Default : /usr/bin/psql) -u pg_user Specify local Postgres user (Default: try to auto-detect or use postgres)
-m pg_main Specify Postgres main directory path -b psql_bin Specify psql binary path (Default: /usr/bin/psql)
(By default, try to auto-detect it, on your system it : -B pg_lsclusters_bin Specify pg_lsclusters binary path (Default: /usr/bin/pg_lsclusters)
/var/lib/postgresql/9.6/main) -V pg_version Specify Postgres version (Default: try to auto-detect or use 9.1)
-r recovery_conf Specify Postgres recovery configuration file path -m pg_main Specify Postgres main directory path (Default: try to auto-detect or use
(Default : [PG_MAIN]/recovery.conf) /var/lib/postgresql//main)
-U pg_master_user Specify Postgres user to use on master (Default : user from recovery.conf file) -r recovery_conf Specify Postgres recovery configuration file path
-p pg_port Specify default Postgres master TCP port (Default : 5432) (Default: [PG_MAIN]/recovery.conf)
-D dbname Specify DB name on Postgres master/slave to connect on (Default : PG_USER) -U pg_master_user Specify Postgres user to use on master (Default: user from recovery.conf file)
-C 1/0 Enable or disable check if the current XLOG file of the master host is the same -p pg_port Specify default Postgres master TCP port (Default: same as local PostgreSQL
of the last replay XLOG file (Default : 1) port if detected or use 5432)
-w replay_warn_delay Specify the replay warning delay in second (Default : 3) -D dbname Specify DB name on Postgres master/slave to connect on (Default: PG_USER, must
-c replay_crit_delay Specify the replay critical delay in second (Default : 5) match with .pgpass one is used)
-d Debug mode -C 1/0 Enable or disable check if the current LSN of the master host is the same
-h Show this message of the last received LSN (Default: 1)
-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)
-d Debug mode
-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