Bug 79 - Error in pgm for action "query_time"
: Error in pgm for action "query_time"
Status: RESOLVED FIXED
Product: check_postgres
General
: unspecified
: All All
: Normal minor
Assigned To: Greg Sabino Mullane
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-22 05:05 EDT by Fabrice Metge
Modified: 2011-06-22 12:04 EDT (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Fabrice Metge 2011-06-22 05:05:29 EDT
Hi,
First, I got to say you that I like your work about perl, postgresql,
monitoring. Brief, BRAVO.

There is an error when you execute "query_time", because postgres user doesn't
have "client_addr" and "client_port" for "local operations" (autovacuum...).

Error is : Argument "" isn't numeric in numeric lt (<) at ./check_postgres.pl
line 4576.

# I replaced next :
$client_port < 1 ? '' : (sprintf ' %s:%s', msg('port'), $client_port),
$client_port lt 1 ? '' : (sprintf ' %s:%s', msg('port'), $client_port),

Fabrice Metge
Comment 1 Greg Sabino Mullane 2011-06-22 12:04:17 EDT
Proposed fix in ce3e0d13a293b9435ff01bde2b6c140c3129b8c7