[check_postgres] Fix for the connection action
Guillaume Lelarge
guillaume at lelarge.info
Sun Sep 25 20:02:35 UTC 2011
Hi,
Right now, if we try to check the connection for two databases, if the
second one doesn't work, check_postgres reports the error for the first
one:
$ LANG=C ./check_postgres.pl --action=connection -db postgres,template0
FATAL: database "template0" is not currently accepting connections
Use of uninitialized value in join or string at ./check_postgres.pl line
1610.
POSTGRES_CONNECTION CRITICAL: DB "postgres" | time=0.01s
So here is a fix that checks the connection for each database, and
reports correctly success and failure.
I will apply it in a few days if there is no objection.
Regards.
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-the-check-of-multiple-db-with-connection-actio.patch
Type: text/x-patch
Size: 1573 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20110925/a8f6755a/attachment.bin
More information about the Check_postgres
mailing list