From c8e6c80dc0a114bb2f6fd4a2002bc626128ee33a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 4 Nov 2020 15:37:18 +0100 Subject: [PATCH] Update comment and README.md file --- README.md | 17 +++++------------ check_pg_streaming_replication | 27 ++++++++++++++++----------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 50b5e2e..1ef6b86 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This script : - check if stand-by client(s) is connected (_WARNING_ raise if not) - Return _OK_ state with list and count of stand-by client(s) -**Note :** This script was originally write for PostgreSQL 9.1 and test on 9.1, 9.5 and 9.6 but it could be compatible with other versions of PostgreSQL. Do not hesitate to tell me how this script work with other versions and share some fix. All contributions are welcome ! +**Note :** This script was originally write for PostgreSQL 9.1 and test on 9.1, 9.5 and 9.6 but it could be compatible with other versions of PostgreSQL. Some adjustments have been made for PostgreSQL >= 10 (without testing it). Do not hesitate to tell me how this script work with other versions and share some fix. All contributions are welcome ! Requirements ------------ @@ -59,20 +59,13 @@ Usage Copyright --------- -Copyright (c) 2014-2019 Benjamin Renard +Copyright (c) 2014-2020 Benjamin Renard License ------- -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/check_pg_streaming_replication b/check_pg_streaming_replication index 18418e9..a1a410d 100755 --- a/check_pg_streaming_replication +++ b/check_pg_streaming_replication @@ -1,22 +1,27 @@ #!/bin/bash # # Nagios plugin to check Postgresql streamin replication state -# +# # Could be use on Master or on standby node # -# Requirement : +# Requirements: # -# On master node : Slaves must be able to connect with user from recovery.conf -# to database with the same name (or another specified with -D) -# as trust (or via md5 using password specified in ~/.pgpass). +# Some CLI tools: 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 specified with -D) as trust -# (or via md5 using password specified 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). # -# Author : Benjamin Renard -# Date : Fri, 25 Aug 2017 15:57:57 +0200 -# Source : http://git.zionetrix.net/check_pg_streaming_replication +# 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). +# +# Author: Benjamin Renard +# Date: Wed, 04 Nov 2020 15:31:13 +0100 +# Source: https://gogs.zionetrix.net/bn8/check_pg_streaming_replication +# SPDX-License-Identifier: GPL-3.0-or-later # DEFAULT_PG_USER=postgres