[check_postgres] Problem with PostgreSQL 9.4beta2

Guillaume Lelarge guillaume at lelarge.info
Sat Aug 9 15:45:28 UTC 2014


2014-08-07 15:32 GMT+02:00 <Marten.Svantesson at ticket.se>:

> I use the checks database_size and connection. Both fails on 9.4beta2. You
> can see the commands and the output below.
>
>
> #/usr/lib64/nagios/plugins/check_postgres.pl --action database_size -w
> 10737418240 -c 16106127360
> Could not parse psql output!
> Please report these details to check_postgres at bucardo.org:
> Version:          2.21.0
> Action:           database_size
> Calling line:     4166
> Output:            dsize   | 8531732
> Command:          /usr/bin/psql -q -t -d postgres -U postgres -p 5432 -o
> /tmp/KhIPK0yQ4B/check_postgres_psql.P5tLQBK.tmp -x-c "BEGIN;SET
> statement_timeout=30000;COMMIT;SELECT pg_database_size(d.oid) AS dsize,
>   pg_size_pretty(pg_database_size(d.oid)) AS pdsize,
>   datname,
>   usename
> FROM pg_database d
> LEFT JOIN pg_user u ON (u.usesysid=d.datdba)"
> Could not parse psql output!
> Please report these details to check_postgres at bucardo.org:
> Version:          2.21.0
> Action:           database_size
> Calling line:     2492
> Output:            version | PostgreSQL 9.4beta2 on
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat
> 4.4.7-4), 64-bit
> Command:          /usr/bin/psql -q -t -d postgres -U postgres -p 5432 -o
> /tmp/pa_uPMd1W5/check_postgres_psql.jjo_gMd.tmp -x-c "BEGIN;SET
> statement_timeout=30000;COMMIT;SELECT version() AS version”
>
>
> # /usr/lib64/nagios/plugins/check_postgres.pl --action connection
> Could not parse psql output!
> Please report these details to check_postgres at bucardo.org:
> Version:          2.21.0
> Action:           connection
> Calling line:     4025
> Output:            v | PostgreSQL 9.4beta2 on x86_64-unknown-linux-gnu,
> compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
> Command:          /usr/bin/psql -q -t -d postgres -U postgres -p 5432 -o
> /tmp/2ZkwgW0YFt/check_postgres_psql.GJ0p5Ps.tmp -x-c "BEGIN;SET
> statement_timeout=30000;COMMIT;SELECT version() AS v"
> Could not parse psql output!
> Please report these details to check_postgres at bucardo.org:
> Version:          2.21.0
> Action:           connection
> Calling line:     2492
> Output:            version | PostgreSQL 9.4beta2 on
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat
> 4.4.7-4), 64-bit
> Command:          /usr/bin/psql -q -t -d postgres -U postgres -p 5432 -o
> /tmp/7SYoP39_c0/check_postgres_psql.wAbBWsm.tmp -x-c "BEGIN;SET
> statement_timeout=30000;COMMIT;SELECT version() AS version”
>
>
This patch seems to fix the issue. check_postgres doesn't give any error.
But the result is still worrysome:

$ ./check_postgres.pl --action backends
POSTGRES_BACKENDS OK: DB "postgres" (port=5442) 1 of 100        connections
(1%) | time=0.01s 'postgres  '=1         ;90;95;0;100        'template0
'=0         ;90;95;0;100        'template1 '=0         ;90;95;0;100

Notice all the spaces on the database names and other values? Not sure how
to get rid of them. I tried a few things but failed.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20140809/69f46b94/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 94.patch
Type: text/x-patch
Size: 457 bytes
Desc: not available
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20140809/69f46b94/attachment.bin>


More information about the Check_postgres mailing list