I have nrpe installed and running on the database system, and nagios server set up and running on another system. I have a .cfg file in /etc/nrpe.d/ on the database system that contains the command to run check_pgsql:
Code: Select all
command[check_pgsql-os]=usr/lib64/nagios/plugins/check_pgsql -l postgres
If I run that command remotely from the nagios server system using check_nrpe
Code: Select all
check_nrpe -H dbsystem -t 60 -c check_pgsql-os
Code: Select all
CRITICAL - no connection to 'template1' (could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
)
Nagios server system is Centos 6, database system is Centos 7, database is Postgres 11.3
Any advice on why check_pgsql would run successfully when run locally and fail when run through check_nrpe would be greatly appreciated.