[check_postgres] check_hot_standby_delay in 2.18.0

Henrik Christian Grove grove at one.com
Mon Feb 27 12:49:01 UTC 2012


man, 28 11 2011 kl. 14:36 -0500, skrev Greg Sabino Mullane: 
> On Wed, Nov 23, 2011 at 01:19:48PM +0100, Henrik Christian Grove wrote:
> > With version 2.16.0 we did:
> > check_postgres --action=hot_standby_delay --dbname=bone
> > --dbuser=bone_admin --dbhost2=one-db2.local --dbname2=bone
> > --dbuser2=bone_admin --showtime=0 --warning=10000
> > and it worked nicely (although it felt silly having to specify the
> > dbname twice - I don't think measuring hot_standby_delay between
> > databases makes much sense).
> > 
> > With 2.18.0 it fails with:
> > Use of uninitialized value $slave in numeric eq (==) at ./check_postgres
> > line 4581.
> 
> Yes, that's definitely a bug that needs fixing.

Just tested 2.19.0 and (except that the failing test has moved to line
4710) the result is the same.

> Seems to me we should only 
> require people to provide the bare minimum as well. In your example 
> above, it should be just:
> 
>  check_postgres --action=hot_standby_delay --dbname=bone
>  --dbhost2=one-db2.local --showtime=0 --warning=10000
> 
> ...
> > The check works if I do:
> > check_postgres --action=hot_standby_delay --dbhost=localhost
> > --dbname=bone --dbuser=bone_admin --dbhost=one-db2.local --showtime=0
> > --warning=10000
> > except that then connection is made through TCP rather than through the
> > UNIX socket. Is there any way to make the local connection through the
> > UNIX socket? 
> 
> I think fixing the above will provide that as well. If a dbhost is provided, 
> it always uses TCP. Although technically you could provide a path to the 
> socket, but nobody wants to do that. :)

.Henrik




More information about the Check_postgres mailing list