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
Check PostgreSQL error relation
Re: Check PostgreSQL error relation
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
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
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Check PostgreSQL error relation
Hi nivyavn,
Looks like you got it working. We'll mark this one as solved.
Thank you for using the Nagiso Community Forum.
Benjamin
Looks like you got it working. We'll mark this one as solved.
Thank you for using the Nagiso Community Forum.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!