[check_postgres] Use of uninitialized value $check_postgres::opt{"output"} in lc at /usr/bin/check_postgres.pl line 757.

David Christensen david at endpoint.com
Wed Mar 30 14:52:55 UTC 2011


On Mar 30, 2011, at 7:15 AM, Peter Geoghegan wrote:

> Hello,
> 
> I've used the version of check_postgres that comes with my distro's
> package manager - 2.16.0 . My perl version is v5.12.3, built for
> x86_64-linux-thread-multi.
> 
> I see this warning output when I perform any check from the command line:
> 
> [peter at laptop check_pg_work]$ check_postgres.pl --action=connection
> --db=postgres --dbuser=peter
> Use of uninitialized value $check_postgres::opt{"output"} in lc at
> /usr/bin/check_postgres.pl line 757.
> POSTGRES_CONNECTION OK: DB "postgres" version 9.0.3 | time=0.01
> 
> Doesn't this have the potential to break a third party parser? I'm
> using the Nagios parse that comes with Zenoss here. I'm afraid that I
> don't know the first thing about Perl.
> 
> Thanks

This has already been fixed in HEAD; changing that referenced line as so should fix it:

-our $OUTPUT = lc $opt{output} || '';
+our $OUTPUT = lc($opt{output} || '');

Regards,

David
--
David Christensen
End Point Corporation
david at endpoint.com






More information about the Check_postgres mailing list