Page 1 of 1

Check PostgreSQL error relation

Posted: Tue Feb 23, 2021 7:27 am
by Quim
Hello

I have a check for PostgreSQL but I get next error:

ERROR: relation public."table_name" does not exist

Command is defined:
define command {
command_name check_postgres_num_notifications_psql01
command_line $USER1$/check_postgres.pl -H $HOSTADDRESS$ -u admin_name -db db_name --action custom_query --query="SELECT count(*) FROM public."table_name" WHERE "column_name" = 0" -w $ARG1$ -c $ARG2$
}

Any help?
Thanks in advance

Re: Check PostgreSQL error relation

Posted: Tue Feb 23, 2021 7:48 am
by Quim
Hi

to solve it, it,s put simple quotes in parameter:

--query='i

Example:
define command {
command_name check_postgres_num_notifications_psql01
command_line $USER1$/check_postgres.pl -H $HOSTADDRESS$ -u admin_name -db db_name --action custom_query --query='SELECT count(*) FROM public."table_name" WHERE "column_name" = 0' -w $ARG1$ -c $ARG2$
}

Thanks

Re: Check PostgreSQL error relation

Posted: Mon Mar 08, 2021 5:20 pm
by benjaminsmith
Hi nivyavn,

Looks like you got it working. We'll mark this one as solved.

Thank you for using the Nagiso Community Forum.

Benjamin