6892005c4d8009cf4bf2f3c9bbe976b2aaf6831b
Benjamin Renard Add README file

Benjamin Renard authored 9 years ago

1) Nagios plugin to check Postgres Streaming replication
2) =====================================================
3) 
4) This script could be used as Nagios check plugin to verify Postgres Streaming
5) replication state.
6) 
7) This script :
8) 
9) - check if Postgres is running (CRITICAL raise if not)
10) - check if Postgres is in recovery mode :
11)   - if Postgres is in recovery mode :
12)     - retreive from Postgres the last xlog file receive and the xlog file replay
13)     - check if Postgres recovery configuration file is NOT present (CRITICAL
14)       raise if present)
15)     - retreive master connection informations from Postgres recovery configuration
16)       file (UNKNOWN raise on error). Default Postgres master TCP port will be used
17)       if port is not specify.
18)     - retreive  current xlog file from Postgres master server (UNKNOWN raise on error).
19)     - check if the last receive xlog file is the last replay xlog file (WARNING raise if not)
20)     - Return OK state
21) - if Postgres is not in recovery mode :
22)   - check if Postgres recovery configuration file is present (CRITICAL raise if present)
23)   - check if stand-by client(s) is connected (WARNING raise if not)
24)   - Return OK state with list and count of stand-by client(s)
25) 
Benjamin Renard Add compatibility note

Benjamin Renard authored 9 years ago

26) Note : This script was originally write and test for PostgreSQL 9.1, but it could be compatible
27) with other versions of PostgreSQL. Do not hesitate to tell me how this script work with other
28) versions and share some fix. All contributions are welcome !
29)