[check_postgres] Problems with running check_postgres in Nagios

Mark Keller mdkeller at gmail.com
Mon Jun 7 18:13:10 UTC 2010


Hi,

I have been having problems getting check_postgres.pl to work
correctly in Nagios. Works great manually from the command line, but
when I add a check command to Nagios I get one of the two following
errors:

PostGres-Conns' on host 'dbhost' did not exit properly!

or

**ePN /usr/bin/check_postgres.pl: "Use of uninitialized value in
concatenation (.) or string at (eval 16) line 606,".

The second error makes me thing there is some problem using embedded
perl for nagios, but I looked through the list archives and didn't
find anything obvious on that note.

My check command is:

define command {
        command_name    check_pg_backends
        command_line    /usr/bin/check_postgres.pl --output nagios
--action backends -H dbhostname -u nagios --dbpass passwd
}

I originally tried the command using variable arguments, but thought
they might not be interpreting correctly, so I hard coded the dbhost
and password for testing and it still gets those errors.

If anyone has any ideas on what I might be doing wrong, I would
appreciate it! I am using CentOS 5 and the check_postgres package from
the EPEL repository.

Thanks,

Mark


More information about the Check_postgres mailing list