[check_postgres] check_postgres - ERROR: Could not find a suitable psql executable

Sureshkumar Rajayokkian sureshkraja at gmail.com
Tue Nov 11 13:23:51 UTC 2014


Hello,

I am trying to set up NRPE based postgres check (from Nagios server to
postrges server (that we wanted to monitor) but it gives below error though
the command works locally (on postgres server).

Postgres server
------------------------

[root at Postgres01 ~]# /usr/lib64/nagios/plugins/check_postgres.pl
--dbuser=user01 --action=connection
POSTGRES_CONNECTION OK: DB "postgres" version 9.3.2 | time=0.01s

Nagios server
-----------------------

[rsk at Nagios_server01 ~]$ sudo /usr/local/nagios/libexec/check_nrpe -H
Postgres01 -t 30 -c check_postgres -a '--dbuser=user01 --dbpass=P at ssw0rd
--action=connection'
ERROR: Could not find a suitable psql executable

Command declared in Postgres server
----------------------------------------------------------


[root at Postgres01 ~]# cat /etc/nagios/nrpe.cfg | grep -i postgres
command[check_postgres]=/usr/lib64/nagios/plugins/check_postgres.pl $ARG1$
$ARG2$ $ARG3$

I tried hardcoded --PGBINDIR and --PSQL=PATH in the check_postgres.pl but
no luck.
Also, I tried pass --PGBINDIR and --PSQL=PATH along with arguments (
$NO_PSQL_OPTION=0) but not worked.

Could you please help me on this and let me know how to troubleshoot your
script when there is an issue?

*Thanks in advance!*

*Note: Both the servers have psql.*

*Best Regards,*
*Suresh*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20141111/5733c200/attachment.html>


More information about the Check_postgres mailing list