[check_postgres] error custom_query

Greg Sabino Mullane greg at endpoint.com
Sun Jul 28 01:33:36 UTC 2013


On Sun, Jul 28, 2013 at 12:39:56AM +0200, l3w0rm wrote:
> ./check_postgres.pl -H=10.8.0.18 --dbuser=xxxxx --dbpass=xxxxx
> --db=bestofdates --critical=5000 --action=custom_query --query="select
> count(*)  from subscribe where registered= 't' "
> POSTGRES_CUSTOM_QUERY UNKNOWN: DB "bestofdates" (host:10.8.0.18) Format
> invalide renvoyé par la requête personnalisée | time=0.06s count=2;;5000

See the documentation on the "custom_query" action. One of the columns 
must be named "result". So you might perhaps want this:

--action="select count(*) AS result FROM subscribe WHERE registered='t'"

http://bucardo.org/check_postgres/check_postgres.pl.html#custom_query


-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Digital signature
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20130727/d740c9ff/attachment.sig>


More information about the Check_postgres mailing list