From ginesgb at gmail.com Wed Oct 19 22:41:31 2022 From: ginesgb at gmail.com (Gines Granados Bayona) Date: Thu, 20 Oct 2022 00:41:31 +0200 Subject: [check_postgres] Problem Nagios check_postgres.pl custom query Message-ID: Good evening to all I have a problem, I launch the query from the local nagios server and I get an invalid format error, can you tell me the reason for this error? */check_postgres.pl -H lab --p 5432 -db test --action=custom_query --query="select max_conn,used,res_for_super,max_conn-used-res_for_super res_for_normal from (select count(*) used from pg_stat_activity) t1, (select setting::int res_for_super from pg_settings where name='superuser_reserved_connections') t2, (select setting::int max_conn from pg_settings where name='max_connections') t3;" --valtype=string -w 5 -c 10 --timeout 100* This is the error that appears *POSTGRES_CUSTOM_QUERY UNKNOWN: DB "test" (host:lab) Invalid format returned by custom query | time=0.03s used=15;5;10* As you can see it shows me the data but not in nagios readable format. Best regards -- Este mensaje se dirige exclusivamente a su destinatario. Puede contener informaci?n confidencial sometida a secreto profesional o cuya divulgaci?n este prohibida, en virtud de la legislaci?n vigente. No esta permitida su divulgaci?n, copia o distribuci?n a terceros sin la autorizaci?n previa y por escrito del remitente. Si ha recibido este mensaje por error, le rogamos nos lo comunique inmediatamente por esta misma v?a y proceda a su destrucci?n. This e-mail is intended exclusively for the individual or entity to which it is addressed and may contain confidential or legally privileged information, which may not be disclosed under current legislation. Any form of disclosure, copying or distribution of this e-mail is strictly prohibited, save with written authorisation . If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message. -------------- next part -------------- An HTML attachment was scrubbed... URL: