Postgres Plugin: http://bucardo.org/wiki/Check_postgres
The Postgres database server must be up and running.
/var/lib/pgsql/data/pg_hba.conf, the authentication method for "local" should be "ident":
# "local" is for Unix domain socket connections only
local all all ident
CentOS and Perl packages
Perl must be installed (this is the default).
To install additional Perl modules, CPAN should be installed, too:
Download and install the Postgres Plugin
Check for the latest version at http://bucardo.org/wiki/Check_postgres, scroll down to "Download".
Set up the Postgres user "nagios"
Set up OS user "nagios"
To keep the Postgres password from preying eyes, a password file is is required in the home directory of OS user "nagios":
Add the following lines to
Test on Nagios server
Replace the "yourserver.yourdomain.tld" with the IP address or IP name of your MySQL server:
/usr/local/nagios/libexec/check_nrpe -H yourserver.yourdomain.tld -c check_pg_connection
If the system returns "ERROR: Could not find a suitable psql executable", your Postgres installation may not use the default location. Normally this should be solved by setting the environment variable "PGBINDIR" to the path to psql, and adding this path to the PATH variable (e.g. in /etc/profile.d/), but for some reasons this doesn't work. You have to modify "check_postgres.pl"