[check_postgres] Problem Nagios check_postgres.pl custom query

Gines Granados Bayona ginesgb at gmail.com
Wed Oct 19 22:41:31 UTC 2022


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 <http://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: <https://bucardo.org/pipermail/check_postgres/attachments/20221020/5a3ed0ba/attachment.htm>


More information about the Check_postgres mailing list