[check_postgres] Error message without explaination

Guillaume Lelarge guillaume at lelarge.info
Sat Nov 12 08:12:46 UTC 2011


On Sat, 2011-11-12 at 08:40 +0100, Gianpaolo Pedrazza wrote:
> Hi,
> I would like to monitoring some psql-instances (9.1.1, server 8.4.8)
> running on Debian 6.0. 
> My configuration on the monitoring server is:
> - Ubuntu 11.10 64 bit
> - Groundwork Monitor Community Edition 6.0.1 64 bit
> - check_postgres-2.18.0
> - postgresql-client-9.1   
> 
> My command is:
> /usr/local/groundwork/nagios/libexec/check_postgres -H 10.1.102.106
> --action connection --dbuser postgres --dbpass XXXXXX 
> 
> When I run from the shell, it works as expected:
> POSTGRES_CONNECTION OK: DB "postgres" (host:10.1.102.106) version 8.4.8
> | time=0.60s
> 
> But when I try it from Groundwork, I get only: 
> ERROR: 
> Command returned exit status 3
> 
> When an older version of psql server (such as 8.3) is running on the
> client side, it works fine.
> I tried to replace postgres-client (9.1) with an older version (8.4),
> but it was unsuccessful. Despite I'm not a Perl-expert, I tried to find
> where is the problem on the script. On line 2274
> 
> eval {
> 	alarm $timeout;
>         $res = system $PSQL => @args;
> };
> 
> Although the arguments are exactly the sames, running the script from
> the bash I get res==0, from groundwork res==11. Can someone suggest what
> i could do to understand what it's getting wrong? 
> 

Does Groundwork execute check_postgres as a specific user? if so, you
should try with the same user.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com



More information about the Check_postgres mailing list