[check_postgres] --action=query_time is broken?

George Hansper George.Hansper at lonelyplanet.com.au
Fri Jan 14 00:30:59 UTC 2011


# check_postgres.pl -H db01 --action=query_time
Could not parse psql output!
Please report these details to check_postgres at bucardo.org:<mailto:check_postgres at bucardo.org:>
Version:      2.15.4
Action:       query_time
Calling line: 4378
Output:       SELECT
Command:      /usr/bin/psql -q -t -d template1 -U postgres -p 5432 -h db01 -o /tmp/EJGtheMh9Y/check_postgres_psql.cBKxPNW.tmp -x -c BEGIN;SET statement_timeout=30000;COMMIT;
SELECT
 xact_start,
 SUBSTR(current_query,0,100) AS current_query,
 client_addr,
 client_port,
 procpid,
 COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0) AS qtime,
 datname,
 usename
FROM pg_stat_activity
WHERE current_query <> '<IDLE>'
ORDER BY xact_start, procpid DESC

________________________________
Curiously, I can run the stated psql command with some success (omitting '-o file'):
xact_start    | 2011-01-14 00:13:06.923975+00
current_query | BEGIN;SET statement_timeout=30000;COMMIT;
SELECT
 xact_start,
 SUBSTR(current_query,0,100) AS curre
client_addr   | 10.XX.XX.XX
client_port   | 49378
procpid       | 19710
qtime         | 0
datname       | template1
usename       | postgres
check_postgres.pl -H db01 --action=connection
POSTGRES_CONNECTION OK: DB "template1" (host:db01) version 9.0.2 | time=0.15

Is there something missing from my setup?

Regards,
    George Hansper


________________________________
This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/check_postgres/attachments/20110114/685edf6b/attachment.html 


More information about the Check_postgres mailing list