How it works...

This recipe comes in three parts because we're doing three distinctly different things. Installing check_postgres itself is actually very easy. The entirety of the utility is contained within a single file, so we can simply move check_postgres.pl to a suitable location in our PATH environment setting. However, we suggest that you use the standard installation process as we did.

While executing sudo make install, look for this line near the end: Installing /usr/local/bin/check_postgres.pl This will indicate where the check_postgres.pl script is located. Ours was installed in /usr/local/bin, but yours may be elsewhere.

Next, we try a couple of basic commands to ensure that check_postgres works. The first command makes use of ...

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.